mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 03:27:44 +00:00
chore: manual inline formatting
Minor manual cleanup - inlined many format args. This makes the code a bit more readable, and helps spot a few inefficiencies and possible bugs. Note that `&foo` in a `format!` parameter results in a 6% extra performance cost, and does not get inlined by the compiler (yet).
This commit is contained in:
parent
b7bf8c9467
commit
982805d3cd
29 changed files with 133 additions and 183 deletions
|
@ -429,7 +429,7 @@ fn test_symlink_implicit_target_dir() {
|
|||
fn test_symlink_to_dir_2args() {
|
||||
let (at, mut ucmd) = at_and_ucmd!();
|
||||
let filename = "test_symlink_to_dir_2args_file";
|
||||
let from_file = &format!("{}/{}", at.as_string(), filename);
|
||||
let from_file = &format!("{}/{filename}", at.as_string());
|
||||
let to_dir = "test_symlink_to_dir_2args_to_dir";
|
||||
let to_file = &format!("{to_dir}/{filename}");
|
||||
|
||||
|
@ -493,7 +493,7 @@ fn test_symlink_relative_path() {
|
|||
let (at, mut ucmd) = at_and_ucmd!();
|
||||
ucmd.args(&["-s", "-v", &p.to_string_lossy(), link])
|
||||
.succeeds()
|
||||
.stdout_only(format!("'{}' -> '{}'\n", link, &p.to_string_lossy()));
|
||||
.stdout_only(format!("'{link}' -> '{}'\n", p.to_string_lossy()));
|
||||
assert!(at.is_symlink(link));
|
||||
assert_eq!(at.resolve_link(link), p.to_string_lossy());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue