mirror of
https://github.com/qwjyh/xdbm
synced 2025-07-18 20:49:19 +09:00
update docs & Cargo.toml
This commit is contained in:
parent
0e8bd6b4c7
commit
f5fe3d6580
12 changed files with 50 additions and 32 deletions
|
@ -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()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -87,7 +87,7 @@ impl StorageExt for OnlineStorage {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
fn parent(&self, storages: &Storages) -> Option<&Storage> {
|
||||
fn parent(&self, _storages: &Storages) -> Option<&Storage> {
|
||||
None
|
||||
}
|
||||
}
|
||||
|
|
|
@ -165,7 +165,7 @@ impl StorageExt for PhysicalDrivePartition {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
fn parent(&self, storages: &Storages) -> Option<&Storage> {
|
||||
fn parent(&self, _storages: &Storages) -> Option<&Storage> {
|
||||
None
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue