Skip to content

Commit

Permalink
refactor: Lints clippy::suspicious_open_options
Browse files Browse the repository at this point in the history
  • Loading branch information
bpetlert committed Feb 15, 2024
1 parent 777ffe3 commit cc4d196
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/mirror.rs
Original file line number Diff line number Diff line change
Expand Up @@ -271,9 +271,8 @@ impl Statistics for Mirrors {

fn to_csv(&self, path: &Path) -> Result<()> {
let file = OpenOptions::new()
.create_new(true)
.write(true)
.create(true)
.append(false)
.open(path)
.with_context(|| format!("Could not create file `{}`", path.display()))?;

Expand Down Expand Up @@ -358,9 +357,8 @@ impl ToPacmanMirrorList for Mirrors {

fn to_mirrorlist_file(&self, path: &Path, source_url: &str) -> Result<()> {
let file = OpenOptions::new()
.create_new(true)
.write(true)
.create(true)
.append(false)
.open(path)
.with_context(|| format!("Could not create file `{}`", path.display()))?;

Expand Down

0 comments on commit cc4d196

Please sign in to comment.