Skip to content

Commit

Permalink
Satisfy new clippy lints.
Browse files Browse the repository at this point in the history
  • Loading branch information
daboross committed Oct 20, 2024
1 parent 8263fe0 commit 1ecc85a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
6 changes: 1 addition & 5 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -342,11 +342,7 @@ type Syslog6TransformFn =
/// [`OpenOptions`]: https://doc.rust-lang.org/std/fs/struct.OpenOptions.html
#[inline]
pub fn log_file<P: AsRef<Path>>(path: P) -> io::Result<File> {
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.
Expand Down
6 changes: 1 addition & 5 deletions src/log_impl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -236,11 +236,7 @@ impl DateBasedConfig {
}

pub fn open_log_file(path: &Path) -> io::Result<fs::File> {
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<fs::File> {
Expand Down

0 comments on commit 1ecc85a

Please sign in to comment.