1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 19:47:45 +00:00

clippy: disable warnings from unnecessary_map_or

because fix requires an MSRV of 1.82
This commit is contained in:
Daniel Hofstetter 2025-02-21 07:17:29 +01:00
parent 6c47989186
commit 9074f3fe8f
4 changed files with 14 additions and 0 deletions

View file

@ -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))

View file

@ -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)

View file

@ -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

View file

@ -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))