Skip to content

Commit

Permalink
cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
milyin committed Nov 28, 2023
1 parent d7b0ea8 commit 6a4b366
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 43 deletions.
1 change: 0 additions & 1 deletion commons/zenoh-util/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,3 @@ mod std_only;

#[cfg(feature = "std")]
pub use std_only::*;

6 changes: 2 additions & 4 deletions zenoh-ext/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,5 @@ impl From<LivelinessSpace> for KeySpace {
#[test]
fn test_default_features() {
// make sure that when inporting zenoh-ext with default features, no unwanted features are pulled from zenoh-core
assert_eq!(zenoh::FEATURES, concat!(
" zenoh/unstable",
));
}
assert_eq!(zenoh::FEATURES, concat!(" zenoh/unstable",));
}
2 changes: 1 addition & 1 deletion zenoh/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,12 @@ use handlers::DefaultHandler;
use net::runtime::Runtime;
use prelude::*;
use scouting::ScoutBuilder;
use zenoh_util::concat_enabled_features;
use std::future::Ready;
use zenoh_core::{AsyncResolve, Resolvable, SyncResolve};
pub use zenoh_macros::{kedefine, keformat, kewrite};
use zenoh_protocol::core::WhatAmIMatcher;
use zenoh_result::{zerror, ZResult};
use zenoh_util::concat_enabled_features;

/// A zenoh error.
pub use zenoh_result::Error;
Expand Down
80 changes: 43 additions & 37 deletions zenohd/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -311,45 +311,51 @@ fn config_from_args(args: &ArgMatches) -> Config {
#[test]
#[cfg(feature = "default")]
fn test_default_features() {
assert_eq!(zenoh::FEATURES, concat!(
" zenoh/auth_pubkey",
" zenoh/auth_usrpwd",
// " zenoh/complete_n",
// " zenoh/shared-memory",
// " zenoh/stats",
" zenoh/transport_multilink",
" zenoh/transport_quic",
// " zenoh/transport_serial",
// " zenoh/transport_unixpipe",
" zenoh/transport_tcp",
" zenoh/transport_tls",
" zenoh/transport_udp",
" zenoh/transport_unixsock-stream",
" zenoh/transport_ws",
" zenoh/unstable",
" zenoh/default",
));
assert_eq!(
zenoh::FEATURES,
concat!(
" zenoh/auth_pubkey",
" zenoh/auth_usrpwd",
// " zenoh/complete_n",
// " zenoh/shared-memory",
// " zenoh/stats",
" zenoh/transport_multilink",
" zenoh/transport_quic",
// " zenoh/transport_serial",
// " zenoh/transport_unixpipe",
" zenoh/transport_tcp",
" zenoh/transport_tls",
" zenoh/transport_udp",
" zenoh/transport_unixsock-stream",
" zenoh/transport_ws",
" zenoh/unstable",
" zenoh/default",
)
);
}

#[test]
#[cfg(not(feature = "default"))]
fn test_no_default_features() {
assert_eq!(zenoh::FEATURES, concat!(
// " zenoh/auth_pubkey",
// " zenoh/auth_usrpwd",
// " zenoh/complete_n",
// " zenoh/shared-memory",
// " zenoh/stats",
// " zenoh/transport_multilink",
// " zenoh/transport_quic",
// " zenoh/transport_serial",
// " zenoh/transport_unixpipe",
// " zenoh/transport_tcp",
// " zenoh/transport_tls",
// " zenoh/transport_udp",
// " zenoh/transport_unixsock-stream",
// " zenoh/transport_ws",
" zenoh/unstable",
// " zenoh/default",
));
}
assert_eq!(
zenoh::FEATURES,
concat!(
// " zenoh/auth_pubkey",
// " zenoh/auth_usrpwd",
// " zenoh/complete_n",
// " zenoh/shared-memory",
// " zenoh/stats",
// " zenoh/transport_multilink",
// " zenoh/transport_quic",
// " zenoh/transport_serial",
// " zenoh/transport_unixpipe",
// " zenoh/transport_tcp",
// " zenoh/transport_tls",
// " zenoh/transport_udp",
// " zenoh/transport_unixsock-stream",
// " zenoh/transport_ws",
" zenoh/unstable",
// " zenoh/default",
)
);
}

0 comments on commit 6a4b366

Please sign in to comment.