Skip to content

Commit

Permalink
fix clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
PSeitz committed Sep 7, 2024
1 parent 15bf2fe commit b579186
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/block/compress.rs
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,7 @@ fn init_dict<T: HashTable>(dict: &mut T, dict_data: &mut &[u8]) {
/// Can be used to preallocate capacity on the output vector
#[inline]
pub const fn get_maximum_output_size(input_len: usize) -> usize {
16 + 4 + (input_len * 110 / 100) as usize
16 + 4 + (input_len * 110 / 100)
}

/// Compress all bytes of `input` into `output`.
Expand Down
4 changes: 1 addition & 3 deletions src/sink.rs
Original file line number Diff line number Diff line change
Expand Up @@ -321,9 +321,7 @@ mod tests {
fn test_sink_slice() {
use crate::sink::Sink;
use crate::sink::SliceSink;
use alloc::vec::Vec;
let mut data = Vec::new();
data.resize(5, 0);
let mut data = vec![0; 5];
let sink = SliceSink::new(&mut data, 1);
assert_eq!(sink.pos(), 1);
assert_eq!(sink.capacity(), 5);
Expand Down

0 comments on commit b579186

Please sign in to comment.