mirror of
https://github.com/nushell/nushell.git
synced 2025-08-10 19:54:34 +02:00
Clippy fixes for Rust 1.58 (#733)
* Clippy fixes for Rust 1.58 * Try different message
This commit is contained in:
@ -389,7 +389,7 @@ Format: #
|
||||
"attr" => nu_style.attr = Some(v.as_string()?),
|
||||
_ => {
|
||||
return Err(ShellError::IncompatibleParametersSingle(
|
||||
format!("problem with key: {}", k.to_string()),
|
||||
format!("problem with key: {}", k),
|
||||
code.span().expect("error with span"),
|
||||
))
|
||||
}
|
||||
|
@ -275,7 +275,7 @@ fn action(
|
||||
}
|
||||
}
|
||||
other => {
|
||||
let got = format!("value is {}, not string", other.get_type().to_string());
|
||||
let got = format!("value is {}, not string", other.get_type());
|
||||
|
||||
Value::Error {
|
||||
error: ShellError::TypeMismatch(got, other.span().unwrap_or(*command_span)),
|
||||
|
@ -90,7 +90,7 @@ fn action(input: &Value, command_span: &Span) -> Value {
|
||||
Value::string(stripped_string, *span)
|
||||
}
|
||||
other => {
|
||||
let got = format!("value is {}, not string", other.get_type().to_string());
|
||||
let got = format!("value is {}, not string", other.get_type());
|
||||
|
||||
Value::Error {
|
||||
error: ShellError::TypeMismatch(got, other.span().unwrap_or(*command_span)),
|
||||
|
@ -111,7 +111,7 @@ impl Command for Kill {
|
||||
}
|
||||
cmd.arg("-9");
|
||||
} else if let Some(signal_value) = signal {
|
||||
cmd.arg(format!("-{}", signal_value.item.to_string()));
|
||||
cmd.arg(format!("-{}", signal_value.item));
|
||||
}
|
||||
|
||||
cmd.arg(pid.to_string());
|
||||
|
Reference in New Issue
Block a user