diff options
Diffstat (limited to 'serde_v8/magic/u16string.rs')
-rw-r--r-- | serde_v8/magic/u16string.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/serde_v8/magic/u16string.rs b/serde_v8/magic/u16string.rs index e304ea187..1e36879a4 100644 --- a/serde_v8/magic/u16string.rs +++ b/serde_v8/magic/u16string.rs @@ -34,9 +34,9 @@ impl FromV8 for U16String { .map_err(|_| Error::ExpectedString)?; let len = v8str.length(); let mut buffer = Vec::with_capacity(len); + #[allow(clippy::uninit_vec)] // SAFETY: we set length == capacity (see previous line), // before immediately writing into that buffer and sanity check with an assert - #[allow(clippy::uninit_vec)] unsafe { buffer.set_len(len); let written = v8str.write( |