Skip to content

Commit

Permalink
Fix clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
anacrolix committed Jul 10, 2024
1 parent 9c4ae63 commit b9a432e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/sys/flock/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ cfg_if! {

cfg_if! {
if #[cfg(unix)] {
mod flock;
pub use self::flock::*;
mod unix;
pub use self::unix::*;
}
}

Expand Down
File renamed without changes.
5 changes: 4 additions & 1 deletion tests/simple_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,12 @@ fn handle_relative_walk_entries_hashset(handle: &Handle) -> HashSet<WalkEntry> {
.expect("should be able to walk handle dir")
.into_iter()
.map(|mut entry: WalkEntry| {
entry.path = entry
let suffix = entry
.path
.strip_prefix(handle.dir())
.expect("walk entry should have handle dir path prefix")
.to_owned();
suffix.clone_into(&mut entry.path);
entry
})
.collect()
Expand Down Expand Up @@ -525,6 +526,8 @@ fn test_writeback_mmap() -> anyhow::Result<()> {
let mut file = OpenOptions::new()
.write(true)
.create(true)
// Don't truncate because we're about to it anyway.
.truncate(false)
.open("writeback")?;
file.set_len(0x1000)?;
let read_file = OpenOptions::new().read(true).open("writeback")?;
Expand Down

0 comments on commit b9a432e

Please sign in to comment.