mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 15:25:06 +02:00
Add general refactorings (#3996)
This commit is contained in:
@ -45,7 +45,7 @@ impl Inc {
|
||||
UntaggedValue::string(ver.to_string())
|
||||
}
|
||||
Some(Action::Default) | None => match input.parse::<u64>() {
|
||||
Ok(v) => UntaggedValue::string(format!("{}", v + 1)),
|
||||
Ok(v) => UntaggedValue::string((v + 1).to_string()),
|
||||
Err(_) => UntaggedValue::string(input),
|
||||
},
|
||||
}
|
||||
|
@ -17,7 +17,7 @@ mod integration {
|
||||
.create(),
|
||||
)
|
||||
.setup(|plugin, returned_values| {
|
||||
let actual = format!("{}", returned_values.unwrap_err());
|
||||
let actual = returned_values.unwrap_err().to_string();
|
||||
|
||||
assert!(actual.contains("can only apply one"));
|
||||
assert_eq!(plugin.error, Some("can only apply one".to_string()));
|
||||
|
Reference in New Issue
Block a user