From 9adef1bbbe4dbecf597b1d42ad69d64a6eea87db Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Tue, 10 Nov 2026 08:50:27 +0100 Subject: [PATCH] remove NOP File::flush from fs tests --- library/std/src/fs/tests.rs | 4 ---- 1 file changed, 4 deletions(-) diff --git a/library/std/src/fs/tests.rs b/library/std/src/fs/tests.rs index 01977792b5751..d19f71c657e2c 100644 --- a/library/std/src/fs/tests.rs +++ b/library/std/src/fs/tests.rs @@ -2753,7 +2753,6 @@ fn test_hidden_file_truncation() { .open(&path) .unwrap(); file.write("hidden world!".as_bytes()).unwrap(); - file.flush().unwrap(); drop(file); // Create a new file by truncating the existing one. @@ -3298,7 +3297,6 @@ fn test_dir_write_file() { let dir = check!(Dir::open(tmpdir.path())); let mut f = check!(dir.open_file_with("foo.txt", &OpenOptions::new().write(true).create(true))); check!(f.write(b"bar")); - check!(f.flush()); drop(f); let mut f = check!(File::open(tmpdir.join("foo.txt"))); let mut buf = [0u8; 3]; @@ -3311,7 +3309,6 @@ fn test_dir_remove_file() { let tmpdir = tmpdir(); let mut f = check!(File::create(tmpdir.join("foo.txt"))); check!(f.write(b"bar")); - check!(f.flush()); drop(f); let dir = check!(Dir::open(tmpdir.path())); check!(dir.remove_file("foo.txt")); @@ -3368,7 +3365,6 @@ fn test_dir_open_dir() { let mut f = check!(dir2.open_file_with("bar.txt", &OpenOptions::new().create(true).write(true))); check!(f.write(b"baz")); - check!(f.flush()); drop(f); let dir3 = check!(dir1.open_dir("foo")); let mut f = check!(dir3.open_file("bar.txt"));