Skip to content

Commit

Permalink
zenoh::config::default()
Browse files Browse the repository at this point in the history
  • Loading branch information
milyin committed Oct 7, 2024
1 parent 7e32e72 commit cab7352
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions zenoh/src/api/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,11 @@ impl Config {
}
}

/// Default configuration. Same as [`Config::default`]
pub fn default() -> Config {
Config::default()
}

#[zenoh_macros::internal_config]
impl std::ops::Deref for Config {
type Target = zenoh_config::Config;
Expand Down
2 changes: 1 addition & 1 deletion zenoh/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -349,9 +349,9 @@ pub mod time {
pub mod config {
pub use zenoh_config::{EndPoint, Locator, WhatAmI, WhatAmIMatcher, ZenohId};

pub use crate::api::config::Config;
#[zenoh_macros::unstable]
pub use crate::api::config::Notifier;
pub use crate::api::config::{default, Config};
}

#[cfg(all(
Expand Down
2 changes: 1 addition & 1 deletion zenoh/tests/session.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const MSG_SIZE: [usize; 2] = [1_024, 100_000];

async fn open_session_unicast(endpoints: &[&str]) -> (Session, Session) {
// Open the sessions
let mut config = zenoh::Config::default();
let mut config = zenoh::config::default();
config
.listen
.endpoints
Expand Down

0 comments on commit cab7352

Please sign in to comment.