Skip to content

Commit da308b1

Browse files
committed
style: Make clippy happy
1 parent 952c968 commit da308b1

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

crates/snapbox/src/data/runtime.rs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ impl Patchwork {
9696
**pos += insert;
9797
}
9898

99-
self.text.replace_range(range, &patch);
99+
self.text.replace_range(range, patch);
100100
}
101101
}
102102

@@ -176,6 +176,7 @@ impl Span {
176176
//
177177
// Seek past the exclam, then skip any whitespace and
178178
// the macro delimiter to get to our argument.
179+
#[allow(clippy::skip_while_next)]
179180
let byte_offset = line
180181
.char_indices()
181182
.skip((pos.column - 1).try_into().unwrap())
@@ -340,14 +341,14 @@ mod tests {
340341
hello
341342
world
342343
"#]"##]],
343-
&patch,
344+
patch,
344345
);
345346

346347
let patch = format_patch(None, r"hello\tworld");
347-
assert_eq(str![[r##"[r#"hello\tworld"#]"##]], &patch);
348+
assert_eq(str![[r##"[r#"hello\tworld"#]"##]], patch);
348349

349350
let patch = format_patch(None, "{\"foo\": 42}");
350-
assert_eq(str![[r##"[r#"{"foo": 42}"#]"##]], &patch);
351+
assert_eq(str![[r##"[r#"{"foo": 42}"#]"##]], patch);
351352

352353
let patch = format_patch(Some(0), "hello\nworld\n");
353354
assert_eq(
@@ -356,11 +357,11 @@ mod tests {
356357
hello
357358
world
358359
"#]"##]],
359-
&patch,
360+
patch,
360361
);
361362

362363
let patch = format_patch(Some(4), "single line");
363-
assert_eq(str![[r#""single line""#]], &patch);
364+
assert_eq(str![[r#""single line""#]], patch);
364365
}
365366

366367
#[test]

0 commit comments

Comments
 (0)