mirror of
https://github.com/nushell/nushell.git
synced 2025-08-17 02:51:15 +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
@ -5,7 +5,7 @@ fn local_socket_path_contains_pid() {
|
||||
let name = make_local_socket_name("test-string")
|
||||
.to_string_lossy()
|
||||
.into_owned();
|
||||
println!("{}", name);
|
||||
println!("{name}");
|
||||
assert!(name.to_string().contains(&std::process::id().to_string()));
|
||||
}
|
||||
|
||||
@ -14,6 +14,6 @@ fn local_socket_path_contains_provided_name() {
|
||||
let name = make_local_socket_name("test-string")
|
||||
.to_string_lossy()
|
||||
.into_owned();
|
||||
println!("{}", name);
|
||||
println!("{name}");
|
||||
assert!(name.to_string().contains("test-string"));
|
||||
}
|
||||
|
@ -201,7 +201,7 @@ fn reader_drop() {
|
||||
|
||||
impl WriteStreamMessage for Check {
|
||||
fn write_stream_message(&mut self, msg: StreamMessage) -> Result<(), ShellError> {
|
||||
assert!(matches!(msg, StreamMessage::Drop(1)), "got {:?}", msg);
|
||||
assert!(matches!(msg, StreamMessage::Drop(1)), "got {msg:?}");
|
||||
self.0.store(true, Relaxed);
|
||||
Ok(())
|
||||
}
|
||||
|
@ -122,8 +122,7 @@ mod tests {
|
||||
let string = std::str::from_utf8(&out).expect("utf-8 error");
|
||||
assert!(
|
||||
string.ends_with('\n'),
|
||||
"doesn't end with newline: {:?}",
|
||||
string
|
||||
"doesn't end with newline: {string:?}"
|
||||
);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user