mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-29 12:07:46 +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 {
|
impl Output {
|
||||||
|
#[allow(clippy::suspicious_open_options)]
|
||||||
fn new(name: Option<&str>) -> UResult<Self> {
|
fn new(name: Option<&str>) -> UResult<Self> {
|
||||||
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.
|
||||||
|
@ -254,7 +255,6 @@ impl Output {
|
||||||
let file = OpenOptions::new()
|
let file = OpenOptions::new()
|
||||||
.write(true)
|
.write(true)
|
||||||
.create(true)
|
.create(true)
|
||||||
.truncate(true)
|
|
||||||
.open(name)
|
.open(name)
|
||||||
.map_err(|e| SortError::OpenFailed {
|
.map_err(|e| SortError::OpenFailed {
|
||||||
path: name.to_owned(),
|
path: name.to_owned(),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue