Some Rust files were previously not formatted according to rustfmt and the top-level rustfmt.toml. This commit correct the formatting in those files. --- rust/examples/connect-command.rs | 1 - rust/tests/test_200_connect_command.rs | 11 ++--------- rust/tests/test_300_get_size.rs | 1 - rust/tests/test_620_stats.rs | 11 ++--------- 4 files changed, 4 insertions(+), 20 deletions(-)
diff --git a/rust/examples/connect-command.rs b/rust/examples/connect-command.rs index db4adbe..4ad6143 100644 --- a/rust/examples/connect-command.rs +++ b/rust/examples/connect-command.rs @@ -1,7 +1,6 @@ //! This example shows how to run an NBD server //! (nbdkit) as a subprocess of libnbd. - fn main() -> libnbd::Result<()> { // Create the libnbd handle. let handle = libnbd::Handle::new()?; diff --git a/rust/tests/test_200_connect_command.rs b/rust/tests/test_200_connect_command.rs index 8338650..963f334 100644 --- a/rust/tests/test_200_connect_command.rs +++ b/rust/tests/test_200_connect_command.rs @@ -17,16 +17,9 @@ #![deny(warnings)] - #[test] fn test_connect_command() { let nbd = libnbd::Handle::new().unwrap(); - nbd.connect_command(&[ - "nbdkit", - "-s", - "--exit-with-parent", - "-v", - "null", - ]) - .unwrap(); + nbd.connect_command(&["nbdkit", "-s", "--exit-with-parent", "-v", "null"]) + .unwrap(); } diff --git a/rust/tests/test_300_get_size.rs b/rust/tests/test_300_get_size.rs index c830164..bed9d87 100644 --- a/rust/tests/test_300_get_size.rs +++ b/rust/tests/test_300_get_size.rs @@ -17,7 +17,6 @@ #![deny(warnings)] - #[test] fn test_get_size() { let nbd = libnbd::Handle::new().unwrap(); diff --git a/rust/tests/test_620_stats.rs b/rust/tests/test_620_stats.rs index 134d59a..0b6f4e2 100644 --- a/rust/tests/test_620_stats.rs +++ b/rust/tests/test_620_stats.rs @@ -17,7 +17,6 @@ #![deny(warnings)] - #[test] fn test_stats() { let nbd = libnbd::Handle::new().unwrap(); @@ -31,14 +30,8 @@ fn test_stats() { // Connection performs handshaking, which increments stats. // The number of bytes/chunks here may grow over time as more features get // automatically negotiated, so merely check that they are non-zero. - nbd.connect_command(&[ - "nbdkit", - "-s", - "--exit-with-parent", - "-v", - "null", - ]) - .unwrap(); + nbd.connect_command(&["nbdkit", "-s", "--exit-with-parent", "-v", "null"]) + .unwrap(); let bs1 = nbd.stats_bytes_sent(); let cs1 = nbd.stats_chunks_sent(); -- 2.41.0 _______________________________________________ Libguestfs mailing list Libguestfs@redhat.com https://listman.redhat.com/mailman/listinfo/libguestfs