mirror of
https://github.com/uutils/coreutils
synced 2024-12-13 14:52:41 +00:00
Merge pull request #6851 from lcheylus/openbsd-suspicious_open_options
sort: enable clippy::suspicious_open_options on OpenBSD
This commit is contained in:
commit
17fee5192e
1 changed files with 1 additions and 3 deletions
|
@ -258,9 +258,7 @@ impl Output {
|
||||||
let file = if let Some(name) = name {
|
let file = if let Some(name) = name {
|
||||||
// This is different from `File::create()` because we don't truncate the output yet.
|
// This is different from `File::create()` because we don't truncate the output yet.
|
||||||
// This allows using the output file as an input file.
|
// This allows using the output file as an input file.
|
||||||
// clippy::suspicious_open_options supported only for Rust >= 1.77.0
|
#[allow(clippy::suspicious_open_options)]
|
||||||
// Rust version = 1.76 on OpenBSD stable/7.5
|
|
||||||
#[cfg_attr(not(target_os = "openbsd"), allow(clippy::suspicious_open_options))]
|
|
||||||
let file = OpenOptions::new()
|
let file = OpenOptions::new()
|
||||||
.write(true)
|
.write(true)
|
||||||
.create(true)
|
.create(true)
|
||||||
|
|
Loading…
Reference in a new issue