mirror of
https://github.com/nushell/nushell.git
synced 2025-08-18 17:58:24 +02:00
Fix easy clippy lints from latest stable (#16053)
1.88.0 was released today, clippy now lints (machine-applicable) against: - format strings with empty braces that could be inlined - easy win - `manual_abs_diff` - returning of a stored result of the last expression. - this can be somewhat contentious but touched only a few places
This commit is contained in:
committed by
GitHub
parent
372d576846
commit
9da0f41ebb
@@ -1359,13 +1359,13 @@ mod test {
|
||||
fn test_range_pattern() {
|
||||
let pat = Pattern::new("a[0-9]b").unwrap();
|
||||
for i in 0..10 {
|
||||
assert!(pat.matches(&format!("a{}b", i)), "a{i}b =~ a[0-9]b");
|
||||
assert!(pat.matches(&format!("a{i}b")), "a{i}b =~ a[0-9]b");
|
||||
}
|
||||
assert!(!pat.matches("a_b"));
|
||||
|
||||
let pat = Pattern::new("a[!0-9]b").unwrap();
|
||||
for i in 0..10 {
|
||||
assert!(!pat.matches(&format!("a{}b", i)));
|
||||
assert!(!pat.matches(&format!("a{i}b")));
|
||||
}
|
||||
assert!(pat.matches("a_b"));
|
||||
|
||||
|
Reference in New Issue
Block a user