Merge pull request #6851 from lcheylus/openbsd-suspicious_open_options

sort: enable clippy::suspicious_open_options on OpenBSD
This commit is contained in:
Sylvestre Ledru 2024-11-14 22:50:37 +01:00 committed by GitHub
commit 17fee5192e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -258,9 +258,7 @@ 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.
// 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))]
#[allow(clippy::suspicious_open_options)]
let file = OpenOptions::new()
.write(true)
.create(true)