From ca6d0c54e6a5df8b2bd0fe45dd305fe1db4c222d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B0=95=EB=8F=99=EC=9C=A4=20=28Donny=29?= Date: Mon, 4 Mar 2024 16:47:57 +0900 Subject: [PATCH] fix clipy --- src/builder.rs | 2 ++ src/encoder.rs | 3 +-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/builder.rs b/src/builder.rs index f633e6c..92aaeb0 100644 --- a/src/builder.rs +++ b/src/builder.rs @@ -181,6 +181,7 @@ impl SourceMapBuilder { } /// Adds a new mapping to the builder. + #[allow(clippy::too_many_arguments)] pub fn add( &mut self, dst_line: u32, @@ -230,6 +231,7 @@ impl SourceMapBuilder { } /// Adds a new mapping to the builder. + #[allow(clippy::too_many_arguments)] pub fn add_raw( &mut self, dst_line: u32, diff --git a/src/encoder.rs b/src/encoder.rs index ffcd670..9a7fea0 100644 --- a/src/encoder.rs +++ b/src/encoder.rs @@ -222,9 +222,8 @@ fn test_encode_rmi() { fn encode(indices: &[usize]) -> String { let mut out = vec![]; - let mut data = Vec::with_capacity(256); // Fill with zeros while testing - data.resize(256, 0); + let mut data = vec![0; 256]; let bits = data.view_bits_mut::(); for &i in indices {