Skip to content

Commit ca6d0c5

Browse files
committed
fix clipy
1 parent e53ed5f commit ca6d0c5

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/builder.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,7 @@ impl SourceMapBuilder {
181181
}
182182

183183
/// Adds a new mapping to the builder.
184+
#[allow(clippy::too_many_arguments)]
184185
pub fn add(
185186
&mut self,
186187
dst_line: u32,
@@ -230,6 +231,7 @@ impl SourceMapBuilder {
230231
}
231232

232233
/// Adds a new mapping to the builder.
234+
#[allow(clippy::too_many_arguments)]
233235
pub fn add_raw(
234236
&mut self,
235237
dst_line: u32,

src/encoder.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,9 +222,8 @@ fn test_encode_rmi() {
222222
fn encode(indices: &[usize]) -> String {
223223
let mut out = vec![];
224224

225-
let mut data = Vec::with_capacity(256);
226225
// Fill with zeros while testing
227-
data.resize(256, 0);
226+
let mut data = vec![0; 256];
228227

229228
let bits = data.view_bits_mut::<Lsb0>();
230229
for &i in indices {

0 commit comments

Comments
 (0)