@@ -96,7 +96,7 @@ impl Patchwork {
96
96
* * pos += insert;
97
97
}
98
98
99
- self . text . replace_range ( range, & patch) ;
99
+ self . text . replace_range ( range, patch) ;
100
100
}
101
101
}
102
102
@@ -176,6 +176,7 @@ impl Span {
176
176
//
177
177
// Seek past the exclam, then skip any whitespace and
178
178
// the macro delimiter to get to our argument.
179
+ #[ allow( clippy:: skip_while_next) ]
179
180
let byte_offset = line
180
181
. char_indices ( )
181
182
. skip ( ( pos. column - 1 ) . try_into ( ) . unwrap ( ) )
@@ -340,14 +341,14 @@ mod tests {
340
341
hello
341
342
world
342
343
"#]"## ] ] ,
343
- & patch,
344
+ patch,
344
345
) ;
345
346
346
347
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) ;
348
349
349
350
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) ;
351
352
352
353
let patch = format_patch ( Some ( 0 ) , "hello\n world\n " ) ;
353
354
assert_eq (
@@ -356,11 +357,11 @@ mod tests {
356
357
hello
357
358
world
358
359
"#]"## ] ] ,
359
- & patch,
360
+ patch,
360
361
) ;
361
362
362
363
let patch = format_patch ( Some ( 4 ) , "single line" ) ;
363
- assert_eq ( str![ [ r#""single line""# ] ] , & patch) ;
364
+ assert_eq ( str![ [ r#""single line""# ] ] , patch) ;
364
365
}
365
366
366
367
#[ test]
0 commit comments