zenoh
zenoh copied to clipboard
Wrong feature flags in tests
Describe the bug
As titled.
To reproduce
cargo clippy --all-targets -p zenoh -- -D warnings
error: unused import: `zenoh::prelude::r#async::*`
--> zenoh/tests/liveliness.rs:15:5
|
15 | use zenoh::prelude::r#async::*;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D unused-imports` implied by `-D warnings`
error: unused import: `std::str::FromStr`
--> zenoh/tests/matching.rs:14:5
|
14 | use std::str::FromStr;
| ^^^^^^^^^^^^^^^^^
|
= note: `-D unused-imports` implied by `-D warnings`
error: unused import: `zenoh_core::ztimeout`
--> zenoh/tests/liveliness.rs:16:5
|
16 | use zenoh_core::ztimeout;
| ^^^^^^^^^^^^^^^^^^^^
error: unused import: `zenoh::prelude::r#async::*`
--> zenoh/tests/matching.rs:16:5
|
16 | use zenoh::prelude::r#async::*;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
error: unused import: `zenoh_core::ztimeout`
--> zenoh/tests/matching.rs:17:5
|
17 | use zenoh_core::ztimeout;
| ^^^^^^^^^^^^^^^^^^^^
error: unused import: `zenoh_result::ZResult as Result`
--> zenoh/tests/matching.rs:18:5
|
18 | use zenoh_result::ZResult as Result;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: constant `TIMEOUT` is never used
--> zenoh/tests/liveliness.rs:18:7
|
18 | const TIMEOUT: Duration = Duration::from_secs(60);
| ^^^^^^^
|
= note: `-D dead-code` implied by `-D warnings`
error: constant `SLEEP` is never used
--> zenoh/tests/liveliness.rs:19:7
|
19 | const SLEEP: Duration = Duration::from_secs(1);
| ^^^^^
error: constant `TIMEOUT` is never used
--> zenoh/tests/matching.rs:20:7
|
20 | const TIMEOUT: Duration = Duration::from_secs(60);
| ^^^^^^^
|
= note: `-D dead-code` implied by `-D warnings`
error: constant `RECV_TIMEOUT` is never used
--> zenoh/tests/matching.rs:21:7
|
21 | const RECV_TIMEOUT: Duration = Duration::from_secs(1);
| ^^^^^^^^^^^^
error: could not compile `zenoh` (test "liveliness") due to 4 previous errors
warning: build failed, waiting for other jobs to finish...
error: could not compile `zenoh` (test "matching") due to 6 previous errors
error[E0425]: cannot find function `init` in crate `zenoh`
--> zenoh/tests/session.rs:230:25
|
230 | let peer01 = zenoh::init(r1.clone()).res_async().await.unwrap();
| ^^^^ not found in `zenoh`
|
note: found an item that was configured out
--> /home/circle/Workings/ZettaScale/src/zenoh/zenoh/src/lib.rs:330:8
|
330 | pub fn init(runtime: Runtime) -> InitBuilder {
| ^^^^
= note: the item is gated behind the `unstable` feature
error[E0425]: cannot find function `init` in crate `zenoh`
--> zenoh/tests/session.rs:232:25
|
232 | let peer02 = zenoh::init(r2.clone()).res_async().await.unwrap();
| ^^^^ not found in `zenoh`
|
note: found an item that was configured out
--> /home/circle/Workings/ZettaScale/src/zenoh/zenoh/src/lib.rs:330:8
|
330 | pub fn init(runtime: Runtime) -> InitBuilder {
| ^^^^
= note: the item is gated behind the `unstable` feature
error[E0425]: cannot find function `init` in crate `zenoh`
--> zenoh/tests/session.rs:234:26
|
234 | let peer01a = zenoh::init(r1.clone()).res_async().await.unwrap();
| ^^^^ not found in `zenoh`
|
note: found an item that was configured out
--> /home/circle/Workings/ZettaScale/src/zenoh/zenoh/src/lib.rs:330:8
|
330 | pub fn init(runtime: Runtime) -> InitBuilder {
| ^^^^
= note: the item is gated behind the `unstable` feature
For more information about this error, try `rustc --explain E0425`.
error: could not compile `zenoh` (test "session") due to 3 previous errors
System info
Skip