mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 11:37:44 +00:00
clippy: disable warnings from unnecessary_map_or
because fix requires an MSRV of 1.82
This commit is contained in:
parent
6c47989186
commit
9074f3fe8f
4 changed files with 14 additions and 0 deletions
|
@ -508,6 +508,8 @@ impl StatPrinter {
|
|||
grand_total += size;
|
||||
}
|
||||
|
||||
// TODO fix requires an MSRV of 1.82
|
||||
#[allow(clippy::unnecessary_map_or)]
|
||||
if !self
|
||||
.threshold
|
||||
.is_some_and(|threshold| threshold.should_exclude(size))
|
||||
|
|
|
@ -869,6 +869,8 @@ fn read_stream_and_create_pages(
|
|||
let last_page = options.end_page;
|
||||
let lines_needed_per_page = lines_to_read_for_page(options);
|
||||
|
||||
// TODO fix requires an MSRV of 1.82
|
||||
#[allow(clippy::unnecessary_map_or)]
|
||||
Box::new(
|
||||
lines
|
||||
.flat_map(split_lines_if_form_feed)
|
||||
|
|
|
@ -605,6 +605,8 @@ impl<'a> Line<'a> {
|
|||
)?;
|
||||
}
|
||||
}
|
||||
// TODO fix requires an MSRV of 1.82
|
||||
#[allow(clippy::unnecessary_map_or)]
|
||||
if settings.mode != SortMode::Random
|
||||
&& !settings.stable
|
||||
&& !settings.unique
|
||||
|
|
|
@ -497,6 +497,8 @@ pub fn uu_app() -> Command {
|
|||
}
|
||||
|
||||
impl TermiosFlag for ControlFlags {
|
||||
// TODO fix requires an MSRV of 1.82
|
||||
#[allow(clippy::unnecessary_map_or)]
|
||||
fn is_in(&self, termios: &Termios, group: Option<Self>) -> bool {
|
||||
termios.control_flags.contains(*self)
|
||||
&& group.map_or(true, |g| !termios.control_flags.intersects(g - *self))
|
||||
|
@ -508,6 +510,8 @@ impl TermiosFlag for ControlFlags {
|
|||
}
|
||||
|
||||
impl TermiosFlag for InputFlags {
|
||||
// TODO fix requires an MSRV of 1.82
|
||||
#[allow(clippy::unnecessary_map_or)]
|
||||
fn is_in(&self, termios: &Termios, group: Option<Self>) -> bool {
|
||||
termios.input_flags.contains(*self)
|
||||
&& group.map_or(true, |g| !termios.input_flags.intersects(g - *self))
|
||||
|
@ -519,6 +523,8 @@ impl TermiosFlag for InputFlags {
|
|||
}
|
||||
|
||||
impl TermiosFlag for OutputFlags {
|
||||
// TODO fix requires an MSRV of 1.82
|
||||
#[allow(clippy::unnecessary_map_or)]
|
||||
fn is_in(&self, termios: &Termios, group: Option<Self>) -> bool {
|
||||
termios.output_flags.contains(*self)
|
||||
&& group.map_or(true, |g| !termios.output_flags.intersects(g - *self))
|
||||
|
@ -530,6 +536,8 @@ impl TermiosFlag for OutputFlags {
|
|||
}
|
||||
|
||||
impl TermiosFlag for LocalFlags {
|
||||
// TODO fix requires an MSRV of 1.82
|
||||
#[allow(clippy::unnecessary_map_or)]
|
||||
fn is_in(&self, termios: &Termios, group: Option<Self>) -> bool {
|
||||
termios.local_flags.contains(*self)
|
||||
&& group.map_or(true, |g| !termios.local_flags.intersects(g - *self))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue