From 1ecc85a53b2743cf2d815d3b253743968ce693ff Mon Sep 17 00:00:00 2001 From: David Ross Date: Sun, 20 Oct 2024 16:39:15 -0700 Subject: [PATCH] Satisfy new clippy lints. --- src/lib.rs | 6 +----- src/log_impl.rs | 6 +----- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 750ad5f..82e1221 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -342,11 +342,7 @@ type Syslog6TransformFn = /// [`OpenOptions`]: https://doc.rust-lang.org/std/fs/struct.OpenOptions.html #[inline] pub fn log_file>(path: P) -> io::Result { - OpenOptions::new() - .write(true) - .create(true) - .append(true) - .open(path) + OpenOptions::new().create(true).append(true).open(path) } /// Convenience method for opening a re-openable log file with common options. diff --git a/src/log_impl.rs b/src/log_impl.rs index 2ea0d51..65ac274 100644 --- a/src/log_impl.rs +++ b/src/log_impl.rs @@ -236,11 +236,7 @@ impl DateBasedConfig { } pub fn open_log_file(path: &Path) -> io::Result { - OpenOptions::new() - .write(true) - .create(true) - .append(true) - .open(path) + OpenOptions::new().create(true).append(true).open(path) } pub fn open_current_log_file(&self, suffix: &str) -> io::Result {