mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2024-11-24 04:09:48 +00:00
ext2: fix needless borrow clippy warnings
The format!() result can be passed directly to functions that accept traits like AsRef<str>. BUG=b:365852007 TEST=tools/clippy # with rust-toolchain 1.81 Change-Id: I5ff01690602b056fd4493d6d3af053d507bd7765 Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5902374 Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org> Commit-Queue: Keiichi Watanabe <keiichiw@chromium.org>
This commit is contained in:
parent
ee6e0ef0ee
commit
951d0ee77b
2 changed files with 4 additions and 4 deletions
|
@ -104,8 +104,8 @@ fn pmem_ext2_manyfiles() -> anyhow::Result<()> {
|
|||
|
||||
let temp_dir = tempfile::tempdir()?;
|
||||
for i in 0..1000 {
|
||||
let f = temp_dir.path().join(&format!("{i}.txt"));
|
||||
std::fs::write(f, &format!("{i}"))?;
|
||||
let f = temp_dir.path().join(format!("{i}.txt"));
|
||||
std::fs::write(f, format!("{i}"))?;
|
||||
}
|
||||
|
||||
let config = Config::new().extra_args(vec![
|
||||
|
|
|
@ -594,7 +594,7 @@ fn test_multiple_block_directory_entry() {
|
|||
std::fs::create_dir(&dir).unwrap();
|
||||
|
||||
for i in 0..1000 {
|
||||
let path = dir.join(&format!("{i}.txt"));
|
||||
let path = dir.join(format!("{i}.txt"));
|
||||
File::create(&path).unwrap();
|
||||
}
|
||||
|
||||
|
@ -705,7 +705,7 @@ fn test_multiple_bg_big_files() {
|
|||
// Prepare a large data.
|
||||
let data = vec!["0123456789"; 5000 * 20].concat();
|
||||
for i in 0..10 {
|
||||
let path = dir.join(&format!("{i}.txt"));
|
||||
let path = dir.join(format!("{i}.txt"));
|
||||
let mut f = File::create(&path).unwrap();
|
||||
f.write_all(data.as_bytes()).unwrap();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue