diff --git a/.gitignore b/.gitignore index fe0c3f0b1..d4e33af6b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ tantivy.iml +.cargo proptest-regressions *.swp target diff --git a/src/directory/ram_directory.rs b/src/directory/ram_directory.rs index a25cdeb82..dc473e9fb 100644 --- a/src/directory/ram_directory.rs +++ b/src/directory/ram_directory.rs @@ -18,13 +18,6 @@ use super::FileHandle; /// Writer associated with the `RamDirectory` /// /// The Writer just writes a buffer. -/// -/// # Panics -/// -/// On drop, if the writer was left in a *dirty* state. -/// That is, if flush was not called after the last call -/// to write. -/// struct VecWriter { path: PathBuf, shared_directory: RamDirectory, diff --git a/src/directory/tests.rs b/src/directory/tests.rs index 5e1c8ec89..354b1538c 100644 --- a/src/directory/tests.rs +++ b/src/directory/tests.rs @@ -118,15 +118,6 @@ mod ram_directory_tests { } } -#[test] -#[should_panic] -fn ram_directory_panics_if_flush_forgotten() { - let test_path: &'static Path = Path::new("some_path_for_test"); - let ram_directory = RamDirectory::create(); - let mut write_file = ram_directory.open_write(test_path).unwrap(); - assert!(write_file.write_all(&[4]).is_ok()); -} - fn test_simple(directory: &dyn Directory) -> crate::Result<()> { let test_path: &'static Path = Path::new("some_path_for_test"); let mut write_file = directory.open_write(test_path)?;