1
Fork 0

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:
Steve Klabnik 2015-11-05 15:30:32 +01:00
parent a216e84727
commit 63576c23e4
15 changed files with 26 additions and 35 deletions

View file

@ -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());