update docs & Cargo.toml

This commit is contained in:
qwjyh 2024-03-17 03:25:44 +09:00
parent 0e8bd6b4c7
commit f5fe3d6580
12 changed files with 50 additions and 32 deletions

View file

@ -1,7 +1,7 @@
//! Device specific common data for storages.
use serde::{Deserialize, Serialize};
use std::path::{self, PathBuf};
use std::path::PathBuf;
/// Store local (device-specific) information
///
@ -10,11 +10,11 @@ use std::path::{self, PathBuf};
#[derive(Serialize, Deserialize, Debug)]
pub struct LocalInfo {
alias: String,
mount_path: path::PathBuf,
mount_path: PathBuf,
}
impl LocalInfo {
pub fn new(alias: String, mount_path: path::PathBuf) -> LocalInfo {
pub fn new(alias: String, mount_path: PathBuf) -> LocalInfo {
LocalInfo { alias, mount_path }
}
@ -22,7 +22,7 @@ impl LocalInfo {
self.alias.clone() // ?
}
pub fn mount_path(&self) -> path::PathBuf {
pub fn mount_path(&self) -> PathBuf {
self.mount_path.clone()
}
}

View file

@ -87,7 +87,7 @@ impl StorageExt for OnlineStorage {
Ok(())
}
fn parent(&self, storages: &Storages) -> Option<&Storage> {
fn parent(&self, _storages: &Storages) -> Option<&Storage> {
None
}
}

View file

@ -165,7 +165,7 @@ impl StorageExt for PhysicalDrivePartition {
Ok(())
}
fn parent(&self, storages: &Storages) -> Option<&Storage> {
fn parent(&self, _storages: &Storages) -> Option<&Storage> {
None
}
}