The Rust crate has some default features, (tokio and log), to enable the
asynchronous API and logging facilities. This patch extends the test
suite to check that the crate compiles even with these features
disabled. The crate did in fact not compile without those features,
so the patch adds a "#[allow(unused)]" attribute to the utils
module to mittigate an error.
---
 rust/run-tests.sh.in | 1 +
 rust/src/lib.rs      | 1 +
 2 files changed, 2 insertions(+)

diff --git a/rust/run-tests.sh.in b/rust/run-tests.sh.in
index 661c018..b24bb7e 100755
--- a/rust/run-tests.sh.in
+++ b/rust/run-tests.sh.in
@@ -26,6 +26,7 @@ requires @NBDKIT@ floppy --version
 requires @NBDKIT@ memory --version
 
 if [ -z "$VG" ]; then
+    @CARGO@ c --no-default-features
     @CARGO@ test -- --nocapture
     @CARGO@ run --example connect-command
     @NBDKIT@ -U - memory 1M \
diff --git a/rust/src/lib.rs b/rust/src/lib.rs
index 56316b4..1e1ca2e 100644
--- a/rust/src/lib.rs
+++ b/rust/src/lib.rs
@@ -25,6 +25,7 @@ mod bindings;
 mod error;
 mod handle;
 pub mod types;
+#[allow(unused)]
 mod utils;
 #[cfg(feature = "tokio")]
 pub use async_bindings::*;
-- 
2.42.0

_______________________________________________
Libguestfs mailing list
Libguestfs@redhat.com
https://listman.redhat.com/mailman/listinfo/libguestfs

Reply via email to