Skip to content

Commit

Permalink
clippy in examples
Browse files Browse the repository at this point in the history
  • Loading branch information
folkertdev committed Jan 8, 2024
1 parent ca768f2 commit 1e3eb01
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/uncompress.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ fn main() {

let mut dest_vec = vec![0u8; 1 << 28];

let mut dest_len = dest_vec.len() as usize;
let mut dest_len = dest_vec.len();
let dest = dest_vec.as_mut_ptr();

let source = input.as_ptr();
Expand All @@ -46,7 +46,7 @@ fn main() {
panic!("error {err}");
}

dest_vec.truncate(dest_len as usize);
dest_vec.truncate(dest_len);

let path = PathBuf::from(path);
std::fs::write(path.with_extension(""), &dest_vec).unwrap();
Expand Down

0 comments on commit 1e3eb01

Please sign in to comment.