From fc53c385c135e31b3a0017de91c267e500ed8c47 Mon Sep 17 00:00:00 2001 From: Michael Ilyin Date: Thu, 30 Nov 2023 17:03:19 +0000 Subject: [PATCH] compilation errors fixed --- plugins/example-plugin/Cargo.toml | 2 +- zenoh/Cargo.toml | 2 +- zenoh/build.rs | 1 - zenoh/src/net/routing/face.rs | 2 ++ zenoh/src/net/routing/resource.rs | 2 +- zenoh/src/net/routing/router.rs | 2 +- zenoh/src/plugins/sealed.rs | 7 +------ 7 files changed, 7 insertions(+), 11 deletions(-) diff --git a/plugins/example-plugin/Cargo.toml b/plugins/example-plugin/Cargo.toml index 40665afef4..a0b279d733 100644 --- a/plugins/example-plugin/Cargo.toml +++ b/plugins/example-plugin/Cargo.toml @@ -39,7 +39,7 @@ env_logger = { workspace = true } futures = { workspace = true } log = { workspace = true } serde_json = { workspace = true } -zenoh = { workspace = true, features = [ "unstable" ] } +zenoh = { workspace = true } zenoh-core = { workspace = true } zenoh-plugin-trait = { workspace = true } zenoh-result = { workspace = true } diff --git a/zenoh/Cargo.toml b/zenoh/Cargo.toml index dee651c527..0177c2d454 100644 --- a/zenoh/Cargo.toml +++ b/zenoh/Cargo.toml @@ -66,8 +66,8 @@ default = [ async-global-executor = { workspace = true } async-std = { workspace = true, features = ["attributes"] } async-trait = { workspace = true } -const_format = { workspace = true } base64 = { workspace = true } +const_format = { workspace = true } env_logger = { workspace = true } event-listener = { workspace = true } flume = { workspace = true } diff --git a/zenoh/build.rs b/zenoh/build.rs index 5be8828dfc..85d3c2d187 100644 --- a/zenoh/build.rs +++ b/zenoh/build.rs @@ -10,7 +10,6 @@ // Contributors: // ZettaScale Zenoh Team, // - fn main() { // Add rustc version to zenohd let version_meta = rustc_version::version_meta().unwrap(); diff --git a/zenoh/src/net/routing/face.rs b/zenoh/src/net/routing/face.rs index 0d2ee926d1..7616420ec8 100644 --- a/zenoh/src/net/routing/face.rs +++ b/zenoh/src/net/routing/face.rs @@ -31,6 +31,7 @@ pub struct FaceState { pub(super) id: usize, pub(super) zid: ZenohId, pub(super) whatami: WhatAmI, + #[allow(dead_code)] pub(super) local: bool, #[cfg(feature = "stats")] pub(super) stats: Option>, @@ -80,6 +81,7 @@ impl FaceState { }) } + #[cfg(feature = "unstable")] #[inline] pub fn is_local(&self) -> bool { self.local diff --git a/zenoh/src/net/routing/resource.rs b/zenoh/src/net/routing/resource.rs index 2b60a301ea..00189b85c9 100644 --- a/zenoh/src/net/routing/resource.rs +++ b/zenoh/src/net/routing/resource.rs @@ -363,7 +363,7 @@ impl Resource { } } - #[allow(dead_code)] + #[cfg(test)] pub fn print_tree(from: &Arc) -> String { let mut result = from.expr(); result.push('\n'); diff --git a/zenoh/src/net/routing/router.rs b/zenoh/src/net/routing/router.rs index cc6b55d5b0..933bd7339c 100644 --- a/zenoh/src/net/routing/router.rs +++ b/zenoh/src/net/routing/router.rs @@ -142,7 +142,7 @@ impl Tables { &self.root_res } - #[allow(dead_code)] + #[cfg(test)] pub fn print(&self) -> String { Resource::print_tree(&self.root_res) } diff --git a/zenoh/src/plugins/sealed.rs b/zenoh/src/plugins/sealed.rs index f3c31be2ea..573c18ab60 100644 --- a/zenoh/src/plugins/sealed.rs +++ b/zenoh/src/plugins/sealed.rs @@ -19,12 +19,7 @@ pub use crate::runtime::Runtime; pub use crate::Result as ZResult; use zenoh_core::zconfigurable; -use zenoh_plugin_trait::Plugin; -use zenoh_plugin_trait::PluginControl; -use zenoh_plugin_trait::PluginInstance; -use zenoh_plugin_trait::PluginReport; -use zenoh_plugin_trait::PluginStatusRec; -use zenoh_plugin_trait::PluginStructVersion; +use zenoh_plugin_trait::{Plugin, PluginControl, PluginInstance, PluginReport, PluginStatusRec, PluginStructVersion}; use zenoh_protocol::core::key_expr::keyexpr; zconfigurable! {