mirror of
https://github.com/uutils/coreutils
synced 2025-01-19 00:24:13 +00:00
lint: allow clippy::suspicious_open_options
in sort.rs
This commit is contained in:
parent
2b5e7caf8b
commit
48e376e1e0
1 changed files with 1 additions and 1 deletions
|
@ -247,6 +247,7 @@ pub struct Output {
|
|||
}
|
||||
|
||||
impl Output {
|
||||
#[allow(clippy::suspicious_open_options)]
|
||||
fn new(name: Option<&str>) -> UResult<Self> {
|
||||
let file = if let Some(name) = name {
|
||||
// This is different from `File::create()` because we don't truncate the output yet.
|
||||
|
@ -254,7 +255,6 @@ impl Output {
|
|||
let file = OpenOptions::new()
|
||||
.write(true)
|
||||
.create(true)
|
||||
.truncate(true)
|
||||
.open(name)
|
||||
.map_err(|e| SortError::OpenFailed {
|
||||
path: name.to_owned(),
|
||||
|
|
Loading…
Reference in a new issue