Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: clippy fixes #2101

Merged
merged 1 commit into from
Aug 1, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions crates/fm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ mod tests {

fn create_dummy_file(dir: &TempDir, file_name: &Path) {
let file_path = dir.path().join(file_name);
let _file = std::fs::File::create(file_path.clone()).unwrap();
let _file = std::fs::File::create(file_path).unwrap();
}

#[test]
Expand All @@ -175,7 +175,7 @@ mod tests {

let mut fm = FileManager::new(dir.path());

let file_id = fm.add_file(&file_name).unwrap();
let file_id = fm.add_file(file_name).unwrap();

assert!(fm.path(file_id).ends_with("foo"));
}
Expand All @@ -189,7 +189,7 @@ mod tests {
let file_name = Path::new("lib.nr");
create_dummy_file(&dir, file_name);

let file_id = fm.add_file(&file_name).unwrap();
let file_id = fm.add_file(file_name).unwrap();

// Create a sub directory
// we now have:
Expand Down Expand Up @@ -238,7 +238,7 @@ mod tests {
let second_file_name = PathBuf::from(sub_sub_dir.path()).join("./../../lib.nr");

// Add both files to the file manager
let file_id = fm.add_file(&file_name).unwrap();
let file_id = fm.add_file(file_name).unwrap();
let second_file_id = fm.add_file(&second_file_name).unwrap();

assert_eq!(file_id, second_file_id);
Expand Down