Skip to content

Commit 42ce634

Browse files
committed
2.0.1: Use .into() for buffer
1 parent ff69a79 commit 42ce634

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ impl Decoder {
160160

161161
#[napi]
162162
pub fn decode_buffer(buffer: Buffer) -> Result<Gif> {
163-
let contents = buffer.to_vec();
163+
let contents: Vec<u8> = buffer.into();
164164
let contents = contents.as_slice();
165165
return Self::decode_internal(contents);
166166
}

0 commit comments

Comments
 (0)