formatting

This commit is contained in:
Ashwin Naren
2026-01-30 19:46:12 -08:00
parent 4409aeddf5
commit ec0ffbfb25
2 changed files with 12 additions and 6 deletions

View File

@@ -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");
}

View File

@@ -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());