remove excess string allocation
&format!("...") is the same as "" if we're not doing any interpolation, and doesn't allocate an intermediate String.
This commit is contained in:
parent
a216e84727
commit
63576c23e4
15 changed files with 26 additions and 35 deletions
|
@ -1732,7 +1732,7 @@ mod tests {
|
|||
let tmpdir = tmpdir();
|
||||
|
||||
let mut dirpath = tmpdir.path().to_path_buf();
|
||||
dirpath.push(&format!("test-가一ー你好"));
|
||||
dirpath.push("test-가一ー你好");
|
||||
check!(fs::create_dir(&dirpath));
|
||||
assert!(dirpath.is_dir());
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue