From 382658a1e3d117bdb264a6d6aa09ecea6f2d87be Mon Sep 17 00:00:00 2001 From: Joseph Perez Date: Fri, 31 May 2024 15:44:09 +0200 Subject: [PATCH] fix: remove `zenoh::scouting::WhatAmI` reexport (#1062) `WhatAmI` is already present in `zenoh::config`. --- examples/src/lib.rs | 6 +++--- zenoh-ext/examples/src/lib.rs | 6 +++--- zenoh/src/lib.rs | 2 -- zenohd/src/main.rs | 3 +-- 4 files changed, 7 insertions(+), 10 deletions(-) diff --git a/examples/src/lib.rs b/examples/src/lib.rs index 0be3809cf2..1ab27dfc8f 100644 --- a/examples/src/lib.rs +++ b/examples/src/lib.rs @@ -49,9 +49,9 @@ impl From<&CommonArgs> for Config { None => Config::default(), }; match value.mode { - Some(Wai::Peer) => config.set_mode(Some(zenoh::scouting::WhatAmI::Peer)), - Some(Wai::Client) => config.set_mode(Some(zenoh::scouting::WhatAmI::Client)), - Some(Wai::Router) => config.set_mode(Some(zenoh::scouting::WhatAmI::Router)), + Some(Wai::Peer) => config.set_mode(Some(zenoh::config::WhatAmI::Peer)), + Some(Wai::Client) => config.set_mode(Some(zenoh::config::WhatAmI::Client)), + Some(Wai::Router) => config.set_mode(Some(zenoh::config::WhatAmI::Router)), None => Ok(None), } .unwrap(); diff --git a/zenoh-ext/examples/src/lib.rs b/zenoh-ext/examples/src/lib.rs index 4c203d5cff..b3e675b046 100644 --- a/zenoh-ext/examples/src/lib.rs +++ b/zenoh-ext/examples/src/lib.rs @@ -43,9 +43,9 @@ impl From<&CommonArgs> for Config { None => Config::default(), }; match value.mode { - Some(Wai::Peer) => config.set_mode(Some(zenoh::scouting::WhatAmI::Peer)), - Some(Wai::Client) => config.set_mode(Some(zenoh::scouting::WhatAmI::Client)), - Some(Wai::Router) => config.set_mode(Some(zenoh::scouting::WhatAmI::Router)), + Some(Wai::Peer) => config.set_mode(Some(zenoh::config::WhatAmI::Peer)), + Some(Wai::Client) => config.set_mode(Some(zenoh::config::WhatAmI::Client)), + Some(Wai::Router) => config.set_mode(Some(zenoh::config::WhatAmI::Router)), None => Ok(None), } .unwrap(); diff --git a/zenoh/src/lib.rs b/zenoh/src/lib.rs index c033c7feee..5f4a6c050a 100644 --- a/zenoh/src/lib.rs +++ b/zenoh/src/lib.rs @@ -321,8 +321,6 @@ pub mod handlers { /// Scouting primitives pub mod scouting { - /// Constants and helpers for zenoh `whatami` flags. - pub use zenoh_protocol::core::WhatAmI; /// A zenoh Hello message. pub use zenoh_protocol::scouting::Hello; diff --git a/zenohd/src/main.rs b/zenohd/src/main.rs index 229352e5db..123f6fc656 100644 --- a/zenohd/src/main.rs +++ b/zenohd/src/main.rs @@ -18,9 +18,8 @@ use tracing_subscriber::{layer::SubscriberExt, util::SubscriberInitExt, EnvFilte #[cfg(feature = "loki")] use url::Url; use zenoh::{ - config::{Config, EndPoint, ModeDependentValue, PermissionsConf, ValidatedMap}, + config::{Config, EndPoint, ModeDependentValue, PermissionsConf, ValidatedMap, WhatAmI}, core::Result, - scouting::WhatAmI, }; #[cfg(feature = "loki")]