diff --git a/plugins/zenoh-plugin-rest/examples/z_serve_sse.rs b/plugins/zenoh-plugin-rest/examples/z_serve_sse.rs index d196b52c59..0c6eb4357b 100644 --- a/plugins/zenoh-plugin-rest/examples/z_serve_sse.rs +++ b/plugins/zenoh-plugin-rest/examples/z_serve_sse.rs @@ -94,7 +94,7 @@ fn parse_args() -> Config { .arg(arg!(-l --listen [ENDPOINT]... "Endpoints to listen on.")) .arg(arg!(-c --config [FILE] "A configuration file.")) .arg( - arg!(--no-multicast-scouting "Disable the multicast-based scouting mechanism." + arg!(--"no-multicast-scouting" "Disable the multicast-based scouting mechanism." ), ) .get_matches(); diff --git a/zenoh-ext/examples/z_pub_cache.rs b/zenoh-ext/examples/z_pub_cache.rs index 516cb3bd83..74f2ada1f8 100644 --- a/zenoh-ext/examples/z_pub_cache.rs +++ b/zenoh-ext/examples/z_pub_cache.rs @@ -64,7 +64,7 @@ fn parse_args() -> (Config, String, String, usize, Option) { ) .arg(arg!(-x --prefix [STRING] "An optional queryable prefix")) .arg(arg!(-c --config [FILE] "A configuration file.")) - .arg(arg!(--no-multicast-scouting "Disable the multicast-based scouting mechanism.")) + .arg(arg!(--"no-multicast-scouting" "Disable the multicast-based scouting mechanism.")) .get_matches(); let mut config = if let Some(conf_file) = args.get_one::<&String>("config") { @@ -97,10 +97,10 @@ fn parse_args() -> (Config, String, String, usize, Option) { .set_enabled(Some(ModeDependentValue::Unique(true))) .unwrap(); - let key_expr = args.get_one::<&String>("key").unwrap().to_string(); - let value = args.get_one::<&String>("value").unwrap().to_string(); - let history: usize = args.get_one::<&String>("history").unwrap().parse().unwrap(); - let prefix = args.get_one::<&String>("prefix").map(|s| (*s).to_owned()); + let key_expr = args.get_one::("key").unwrap().to_string(); + let value = args.get_one::("value").unwrap().to_string(); + let history: usize = args.get_one::("history").unwrap().parse().unwrap(); + let prefix = args.get_one::("prefix").map(|s| (*s).to_owned()); (config, key_expr, value, history, prefix) } diff --git a/zenoh-ext/examples/z_query_sub.rs b/zenoh-ext/examples/z_query_sub.rs index 4d308bca51..73433ebf14 100644 --- a/zenoh-ext/examples/z_query_sub.rs +++ b/zenoh-ext/examples/z_query_sub.rs @@ -93,7 +93,7 @@ fn parse_args() -> (Config, String, Option) { arg!(-q --query [SELECTOR] "The selector to use for queries (by default it's same than 'selector' option)") ) .arg(arg!(-c --config [FILE] "A configuration file.")) - .arg(arg!(--no-multicast-scouting "Disable the multicast-based scouting mechanism.")) + .arg(arg!(--"no-multicast-scouting" "Disable the multicast-based scouting mechanism.")) .get_matches(); let mut config = if let Some(conf_file) = args.get_one::<&String>("config") { @@ -120,8 +120,8 @@ fn parse_args() -> (Config, String, Option) { config.scouting.multicast.set_enabled(Some(false)).unwrap(); } - let key_expr = args.get_one::<&String>("key").unwrap().to_string(); - let query = args.get_one::<&String>("query").map(ToString::to_string); + let key_expr = args.get_one::("key").unwrap().to_string(); + let query = args.get_one::("query").map(ToString::to_string); (config, key_expr, query) } diff --git a/zenoh-ext/examples/z_view_size.rs b/zenoh-ext/examples/z_view_size.rs index 5756048853..8304a26f31 100644 --- a/zenoh-ext/examples/z_view_size.rs +++ b/zenoh-ext/examples/z_view_size.rs @@ -99,10 +99,10 @@ fn parse_args() -> (Config, String, Option, usize, u64) { .extend(values.map(|v| v.parse().unwrap())) } - let group = args.get_one::<&String>("group").unwrap().to_string(); - let id = args.get_one::<&String>("id").map(|v| (*v).to_owned()); - let size: usize = args.get_one::<&String>("size").unwrap().parse().unwrap(); - let timeout: u64 = args.get_one::<&String>("timeout").unwrap().parse().unwrap(); + let group = args.get_one::("group").unwrap().to_string(); + let id = args.get_one::("id").map(|v| (*v).to_owned()); + let size: usize = args.get_one::("size").unwrap().parse().unwrap(); + let timeout: u64 = args.get_one::("timeout").unwrap().parse().unwrap(); (config, group, id, size, timeout) }