Skip to content

Commit

Permalink
service: clean clippy warnings for macos
Browse files Browse the repository at this point in the history
Clean clippy warnings for macos.

Signed-off-by: Jiang Liu <[email protected]>
  • Loading branch information
jiangliu committed Mar 22, 2023
1 parent c202e91 commit 9904f6d
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 15 deletions.
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ vmm-sys-util = { version = "0.10.0", optional = true }

[dev-dependencies]
xattr = "0.2.3"
vmm-sys-util = "0.10.0"

[features]
default = [
Expand Down
38 changes: 23 additions & 15 deletions service/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ mod fusedev;
mod singleton;
pub mod upgrade;

pub use blob_cache::BlobCacheMgr;
pub use fs_service::{FsBackendCollection, FsBackendMountCmd, FsBackendUmountCmd, FsService};
pub use fusedev::{create_fuse_daemon, FusedevDaemon};
pub use singleton::create_daemon;
Expand All @@ -49,8 +50,6 @@ pub mod block_nbd;
#[cfg(target_os = "linux")]
mod fs_cache;

#[cfg(target_os = "linux")]
pub use blob_cache::BlobCacheMgr;
#[cfg(target_os = "linux")]
pub use fs_cache::FsCacheHandler;

Expand Down Expand Up @@ -228,24 +227,33 @@ pub trait ServiceArgs {
}

#[cfg(not(target_os = "linux"))]
pub struct BlobCacheMgr {}
mod blob_cache {
use super::*;

#[cfg(not(target_os = "linux"))]
impl BlobCacheMgr {
pub fn new() -> Self {
BlobCacheMgr {}
}
pub struct BlobCacheMgr {}

pub fn add_blob_list(&self, _blobs: &nydus_api::BlobCacheList) -> std::io::Result<()> {
unimplemented!()
impl Default for BlobCacheMgr {
fn default() -> Self {
Self::new()
}
}

pub fn add_blob_entry(&self, _entry: &nydus_api::BlobCacheEntry) -> Result<()> {
unimplemented!()
}
impl BlobCacheMgr {
pub fn new() -> Self {
BlobCacheMgr {}
}

pub fn add_blob_list(&self, _blobs: &nydus_api::BlobCacheList) -> io::Result<()> {
unimplemented!()
}

pub fn remove_blob_entry(&self, _param: &nydus_api::BlobCacheObjectId) -> Result<()> {
unimplemented!()
pub fn add_blob_entry(&self, _entry: &nydus_api::BlobCacheEntry) -> Result<()> {
unimplemented!()
}

pub fn remove_blob_entry(&self, _param: &nydus_api::BlobCacheObjectId) -> Result<()> {
unimplemented!()
}
}
}

Expand Down

0 comments on commit 9904f6d

Please sign in to comment.