diff --git a/usertest/src/fs.rs b/usertest/src/fs.rs index 5264e09..a3f6254 100644 --- a/usertest/src/fs.rs +++ b/usertest/src/fs.rs @@ -590,8 +590,11 @@ fn test_rust_file() { fs::hard_link(path, "/tmp/rust_fs_test_link.txt").expect("Failed to create hard link"); let metadata = fs::metadata(path).expect("Failed to get metadata"); assert_eq!(metadata.len(), 12); - fs::rename("/tmp/rust_fs_test_link.txt", "/tmp/rust_fs_test_renamed.txt") - .expect("Failed to rename file"); + fs::rename( + "/tmp/rust_fs_test_link.txt", + "/tmp/rust_fs_test_renamed.txt", + ) + .expect("Failed to rename file"); fs::remove_file("/tmp/rust_fs_test_renamed.txt").expect("Failed to delete renamed file"); fs::remove_file(path).expect("Failed to delete file"); } diff --git a/usertest/src/main.rs b/usertest/src/main.rs index 359747c..a13581b 100644 --- a/usertest/src/main.rs +++ b/usertest/src/main.rs @@ -1,9 +1,9 @@ +use colored::Colorize; use std::{ io::{Write, stdout}, sync::{Arc, Barrier, Mutex}, thread, }; -use colored::Colorize; mod fs; mod futex; @@ -21,7 +21,7 @@ macro_rules! register_test { ($name:ident) => { // Add to inventory inventory::submit! { - crate::Test { + $crate::Test { test_text: concat!(module_path!(), "::", stringify!($name)), test_fn: $name, } @@ -30,7 +30,7 @@ macro_rules! register_test { ($name:ident, $text:expr) => { // Add to inventory inventory::submit! { - crate::Test { + $crate::Test { test_text: $text, test_fn: $name, } @@ -246,7 +246,10 @@ fn main() { } let end = std::time::Instant::now(); if failures > 0 { - eprintln!("{failures} tests failed in {} ms", (end - start).as_millis()); + eprintln!( + "{failures} tests failed in {} ms", + (end - start).as_millis() + ); std::process::exit(1); } println!("All tests passed in {} ms", (end - start).as_millis());