Skip to content

Commit

Permalink
Merge pull request #139 from daboross/dross/new-msrv
Browse files Browse the repository at this point in the history
Update MSRV to 1.60 to match log crate
  • Loading branch information
daboross authored Oct 20, 2024
2 parents 4f45ef9 + 1ecc85a commit 8236409
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 15 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand All @@ -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:
Expand All @@ -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:
Expand Down
3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ version = "0.6.2"
authors = ["David Ross <[email protected]>"]
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"
Expand Down
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 8236409

Please sign in to comment.