Skip to content

Commit

Permalink
Make clippy happier
Browse files Browse the repository at this point in the history
  • Loading branch information
bash committed Jan 23, 2024
1 parent c6e7538 commit 6f43277
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions crates/portal-wormhole/src/fs/path_parts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@ mod tests {
assert_eq!(
expected,
PathParts::try_from(Path::new(input))
.unwrap()
.expect("input to be a valid path")
.to_path_with_counter(1)
.to_str()
.unwrap()
.expect("path to be valid unicode")
);
}
}
Expand Down
7 changes: 4 additions & 3 deletions crates/portal-wormhole/src/fs/persist.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ mod tests {
#[test]
fn uses_original_file_name_when_possible() {
let expected_path = PathBuf::from("bar/foo.txt");
let path =
open_with_conflict_resolution(&expected_path, open(VecDeque::default())).unwrap();
let path = open_with_conflict_resolution(&expected_path, open(VecDeque::default()))
.expect("open to succeed");
assert_eq!(path, expected_path);
}

Expand All @@ -52,7 +52,8 @@ mod tests {
PathBuf::from("bar/foo (3).txt"),
];
let expected_path = PathBuf::from("bar/foo (4).txt");
let path = open_with_conflict_resolution(&first_path, open(existing_paths.into())).unwrap();
let path = open_with_conflict_resolution(&first_path, open(existing_paths.into()))
.expect("open to succeed");
assert_eq!(path, expected_path);
}

Expand Down

0 comments on commit 6f43277

Please sign in to comment.