mirror of
https://github.com/sharkdp/hyperfine.git
synced 2026-11-01 08:50:19 +00:00
style: simplify string interpolation
This commit is contained in:
1 parent
e8ff88dad1
commit
ef1263279d
13 files changed
+30
-33
No files matched your search
@@ -86,7 +86,7 @@ impl<'a> Scheduler<'a> {
|
||||
"{}{} times faster than {}",
|
||||
format!("{:8.2}", item.relative_speed).bold().green(),
|
||||
if let Some(stddev) = item.relative_speed_stddev {
|
||||
format!(" ± {}", format!("{:.2}", stddev).green())
|
||||
format!(" ± {}", format!("{stddev:.2}").green())
|
||||
} else {
|
||||
"".into()
|
||||
},
|
||||
@@ -104,7 +104,7 @@ impl<'a> Scheduler<'a> {
|
||||
if item.is_fastest {
|
||||
" ".into()
|
||||
} else if let Some(stddev) = item.relative_speed_stddev {
|
||||
format!(" ± {}", format!("{:5.2}", stddev).green())
|
||||
format!(" ± {}", format!("{stddev:5.2}").green())
|
||||
} else {
|
||||
" ".into()
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user