mirror of
https://github.com/sharkdp/bat.git
synced 2026-10-30 10:06:12 +00:00
inline format arguments
In a few cases, removed the unneeded `&` - this causes a minor slowdown because compiler cannot eliminate those (yet).
This commit is contained in:
1 parent
9824090654
commit
d9fbd18541
14 files changed
+32
-45
No files matched your search
Vendored
+1
-1
@@ -1,5 +1,5 @@
|
||||
// Output the square of a number.
|
||||
fn print_square(num: f64) {
|
||||
let result = f64::powf(num, 2.0);
|
||||
println!("The square of {:.2} is {:.2}.", num, result);
|
||||
println!("The square of {num:.2} is {result:.2}.");
|
||||
}
|
||||
Reference in new issue
Block a user