Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

service: clean clippy warnings for macos #1169

Merged
merged 1 commit into from
Mar 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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