mirror of
https://github.com/sharkdp/hyperfine.git
synced 2026-11-01 08:50:19 +00:00
refactor: Optimize code based on cargo clippy suggestions
Signed-off-by: one230six <723682061@qq.com> refactor: Optimize code based on cargo clippy suggestions Signed-off-by: one230six <723682061@qq.com>
This commit is contained in:
1 parent
865b496098
commit
c0921351e7
3 files changed
+11
-11
No files matched your search
+5
-5
@@ -59,11 +59,11 @@ impl<'a> Command<'a> {
|
||||
}
|
||||
|
||||
pub fn get_name_with_unused_parameters(&self) -> String {
|
||||
let parameters =
|
||||
self.get_unused_parameters()
|
||||
.fold(String::new(), |output, (parameter, value)| {
|
||||
output + &format!("{} = {}, ", parameter, value.to_string())
|
||||
});
|
||||
let parameters = self
|
||||
.get_unused_parameters()
|
||||
.fold(String::new(), |output, (parameter, value)| {
|
||||
output + &format!("{} = {}, ", parameter, value)
|
||||
});
|
||||
let parameters = parameters.trim_end_matches(", ");
|
||||
let parameters = if parameters.is_empty() {
|
||||
"".into()
|
||||
|
||||
Reference in new issue
Block a user