Skip to content

Commit b9a432e

Browse files
committed
Fix clippy warnings
1 parent 9c4ae63 commit b9a432e

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

src/sys/flock/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ cfg_if! {
1313

1414
cfg_if! {
1515
if #[cfg(unix)] {
16-
mod flock;
17-
pub use self::flock::*;
16+
mod unix;
17+
pub use self::unix::*;
1818
}
1919
}
2020

File renamed without changes.

tests/simple_tests.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,12 @@ fn handle_relative_walk_entries_hashset(handle: &Handle) -> HashSet<WalkEntry> {
7777
.expect("should be able to walk handle dir")
7878
.into_iter()
7979
.map(|mut entry: WalkEntry| {
80-
entry.path = entry
80+
let suffix = entry
8181
.path
8282
.strip_prefix(handle.dir())
8383
.expect("walk entry should have handle dir path prefix")
8484
.to_owned();
85+
suffix.clone_into(&mut entry.path);
8586
entry
8687
})
8788
.collect()
@@ -525,6 +526,8 @@ fn test_writeback_mmap() -> anyhow::Result<()> {
525526
let mut file = OpenOptions::new()
526527
.write(true)
527528
.create(true)
529+
// Don't truncate because we're about to it anyway.
530+
.truncate(false)
528531
.open("writeback")?;
529532
file.set_len(0x1000)?;
530533
let read_file = OpenOptions::new().read(true).open("writeback")?;

0 commit comments

Comments
 (0)