move device related functions & add doc

This commit is contained in:
qwjyh 2023-12-05 03:58:19 +09:00
parent 9706e8d41e
commit 83233740aa
4 changed files with 67 additions and 58 deletions

View file

@ -1,3 +1,5 @@
//! Device specific common data for storages.
use serde::{Deserialize, Serialize};
use std::path;

View file

@ -91,7 +91,11 @@ impl StorageExt for PhysicalDrivePartition {
self.local_info.get(&device.name()).is_some()
}
fn mount_path(&self, device: &devices::Device, _: &HashMap<String, Storage>) -> Result<path::PathBuf> {
fn mount_path(
&self,
device: &devices::Device,
_: &HashMap<String, Storage>,
) -> Result<path::PathBuf> {
Ok(self
.local_info
.get(&device.name())