diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 065ab54..155341a 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -117,7 +117,7 @@ jobs: with: profile: minimal # when updating this, also update rust-version in Cargo.toml - toolchain: 1.31.0 + toolchain: 1.60.0 override: true - run: cargo build - run: cargo build --features reopen-1,reopen-03,meta-logging-in-format,syslog-3 @@ -134,7 +134,7 @@ jobs: - uses: actions-rs/toolchain@v1 with: profile: minimal - toolchain: 1.48.0 + toolchain: 1.61.0 override: true - run: cargo build --features date-based msrv_syslog_4: @@ -150,7 +150,7 @@ jobs: - uses: actions-rs/toolchain@v1 with: profile: minimal - toolchain: 1.51.0 + toolchain: 1.65.0 override: true - run: cargo build --features syslog-4 msrv_syslog_6: @@ -166,7 +166,7 @@ jobs: - uses: actions-rs/toolchain@v1 with: profile: minimal - toolchain: 1.59.0 + toolchain: 1.67.0 override: true - run: cargo build --features syslog-6 fmt_and_clippy: diff --git a/Cargo.toml b/Cargo.toml index 3fd3fbf..cdfc877 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,7 +5,8 @@ version = "0.6.2" authors = ["David Ross "] description = "Simple, efficient logging" edition = "2018" -rust-version = "1.31" +# when updating this, also update toolchain in .github/workflows/rust.yml +rust-version = "1.60" documentation = "https://docs.rs/fern/" repository = "https://github.com/daboross/fern" 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 {