mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2025-01-22 04:25:21 +00:00
vm-virtio: Remove unnecessary cloning
Found by updated clippy: error: redundant clone --> vm-virtio/src/block.rs:182:5 | 182 | .to_owned(); | ^^^^^^^^^^^ help: remove this | = note: `-D clippy::redundant-clone` implied by `-D warnings` note: this value is dropped without further use --> vm-virtio/src/block.rs:176:21 | 176 | let device_id = format!( | _____________________^ 177 | | "{}{}{}", 178 | | blk_metadata.st_dev(), 179 | | blk_metadata.st_rdev(), 180 | | blk_metadata.st_ino() 181 | | ) 182 | | .to_owned(); | |____^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_clone Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
parent
deb3cbd501
commit
9fb1c46cd1
@ -178,8 +178,7 @@ fn build_device_id(disk_path: &PathBuf) -> result::Result<String, Error> {
|
|||||||
blk_metadata.st_dev(),
|
blk_metadata.st_dev(),
|
||||||
blk_metadata.st_rdev(),
|
blk_metadata.st_rdev(),
|
||||||
blk_metadata.st_ino()
|
blk_metadata.st_ino()
|
||||||
)
|
);
|
||||||
.to_owned();
|
|
||||||
Ok(device_id)
|
Ok(device_id)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user