1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 11:37:44 +00:00

Merge pull request #6292 from lcheylus/clippy-sort

sort: disable clippy::suspicious_open_options on OpenBSD
This commit is contained in:
Daniel Hofstetter 2024-04-30 14:13:38 +02:00 committed by GitHub
commit b8aa4e1d10
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -252,7 +252,9 @@ impl Output {
let file = if let Some(name) = name {
// This is different from `File::create()` because we don't truncate the output yet.
// This allows using the output file as an input file.
#[allow(clippy::suspicious_open_options)]
// clippy::suspicious_open_options supported only for Rust >= 1.77.0
// Rust version = 1.76 on OpenBSD stable/7.5
#[cfg_attr(not(target_os = "openbsd"), allow(clippy::suspicious_open_options))]
let file = OpenOptions::new()
.write(true)
.create(true)