mirror of
https://github.com/qwjyh/xdbm
synced 2025-07-18 20:49:19 +09:00
fixup! replace raw HashMap with Storages
This commit is contained in:
parent
8eb7d1179d
commit
e3675632c1
2 changed files with 21 additions and 32 deletions
|
@ -193,7 +193,7 @@ impl fmt::Display for PhysicalDrivePartition {
|
|||
pub fn select_physical_storage(
|
||||
device: Device,
|
||||
storages: &Storages,
|
||||
) -> Result<(String, PhysicalDrivePartition)> {
|
||||
) -> Result<PhysicalDrivePartition> {
|
||||
trace!("select_physical_storage");
|
||||
// get disk info fron sysinfo
|
||||
let sys_disks =
|
||||
|
@ -217,8 +217,8 @@ pub fn select_physical_storage(
|
|||
println!("The name {} is already used.", disk_name);
|
||||
}
|
||||
trace!("selected name: {}", disk_name);
|
||||
let storage = PhysicalDrivePartition::try_from_sysinfo_disk(&disk, disk_name.clone(), device)?;
|
||||
Ok((disk_name, storage))
|
||||
let storage = PhysicalDrivePartition::try_from_sysinfo_disk(&disk, disk_name, device)?;
|
||||
Ok(storage)
|
||||
}
|
||||
|
||||
pub fn select_sysinfo_disk(sysinfo: &sysinfo::System) -> Result<&Disk> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue