Skip to content

Commit

Permalink
2.0.1: Use .into() for buffer
Browse files Browse the repository at this point in the history
  • Loading branch information
Chi-EEE committed Jul 28, 2024
1 parent ff69a79 commit 42ce634
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ impl Decoder {

#[napi]
pub fn decode_buffer(buffer: Buffer) -> Result<Gif> {
let contents = buffer.to_vec();
let contents: Vec<u8> = buffer.into();
let contents = contents.as_slice();
return Self::decode_internal(contents);
}
Expand Down

0 comments on commit 42ce634

Please sign in to comment.