diff --git a/install/src/command.rs b/install/src/command.rs index ed8d37ff0f3b8e..d7b92c17690bda 100644 --- a/install/src/command.rs +++ b/install/src/command.rs @@ -501,7 +501,6 @@ fn add_to_path(new_path: &str) -> bool { fn append_file(dest: &Path, line: &str) -> io::Result<()> { use std::io::Write; let mut dest_file = fs::OpenOptions::new() - .write(true) .append(true) .create(true) .open(dest)?; diff --git a/logger/src/lib.rs b/logger/src/lib.rs index 7b9ae30d881053..6cc57e81c531f3 100644 --- a/logger/src/lib.rs +++ b/logger/src/lib.rs @@ -58,7 +58,6 @@ pub fn setup() { pub fn setup_file_with_default(logfile: &str, filter: &str) { use std::fs::OpenOptions; let file = OpenOptions::new() - .write(true) .create(true) .append(true) .open(logfile) diff --git a/validator/src/lib.rs b/validator/src/lib.rs index 4e7ed43ec78309..e1b9df96b9b03e 100644 --- a/validator/src/lib.rs +++ b/validator/src/lib.rs @@ -24,12 +24,7 @@ pub mod dashboard; #[cfg(unix)] fn redirect_stderr(filename: &str) { use std::os::unix::io::AsRawFd; - match OpenOptions::new() - .write(true) - .create(true) - .append(true) - .open(filename) - { + match OpenOptions::new().create(true).append(true).open(filename) { Ok(file) => unsafe { libc::dup2(file.as_raw_fd(), libc::STDERR_FILENO); },