Skip to content

Commit

Permalink
Test drop mmap before remove file
Browse files Browse the repository at this point in the history
  • Loading branch information
LokiSharp committed Dec 15, 2023
1 parent 00de205 commit 6e0c3f6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1588,6 +1588,10 @@ mod test {

assert!(mmap.is_ok());

if let Ok(mmap) = mmap {
std::mem::drop(mmap);
}

let remove_res = fs::remove_file(path.clone());
if remove_res.is_err() {
println!("remove_res: {:?}", remove_res);
Expand Down

0 comments on commit 6e0c3f6

Please sign in to comment.