mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 11:37:44 +00:00
Merge pull request #7329 from cakebaker/clippy_fix_warnings_rust_1_85
clippy: fix/disable warnings introduced with Rust `1.85`
This commit is contained in:
commit
d065e172f7
5 changed files with 15 additions and 1 deletions
|
@ -508,6 +508,8 @@ impl StatPrinter {
|
||||||
grand_total += size;
|
grand_total += size;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO fix requires an MSRV of 1.82
|
||||||
|
#[allow(clippy::unnecessary_map_or)]
|
||||||
if !self
|
if !self
|
||||||
.threshold
|
.threshold
|
||||||
.is_some_and(|threshold| threshold.should_exclude(size))
|
.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 last_page = options.end_page;
|
||||||
let lines_needed_per_page = lines_to_read_for_page(options);
|
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(
|
Box::new(
|
||||||
lines
|
lines
|
||||||
.flat_map(split_lines_if_form_feed)
|
.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
|
if settings.mode != SortMode::Random
|
||||||
&& !settings.stable
|
&& !settings.stable
|
||||||
&& !settings.unique
|
&& !settings.unique
|
||||||
|
|
|
@ -497,6 +497,8 @@ pub fn uu_app() -> Command {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl TermiosFlag for ControlFlags {
|
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 {
|
fn is_in(&self, termios: &Termios, group: Option<Self>) -> bool {
|
||||||
termios.control_flags.contains(*self)
|
termios.control_flags.contains(*self)
|
||||||
&& group.map_or(true, |g| !termios.control_flags.intersects(g - *self))
|
&& group.map_or(true, |g| !termios.control_flags.intersects(g - *self))
|
||||||
|
@ -508,6 +510,8 @@ impl TermiosFlag for ControlFlags {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl TermiosFlag for InputFlags {
|
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 {
|
fn is_in(&self, termios: &Termios, group: Option<Self>) -> bool {
|
||||||
termios.input_flags.contains(*self)
|
termios.input_flags.contains(*self)
|
||||||
&& group.map_or(true, |g| !termios.input_flags.intersects(g - *self))
|
&& group.map_or(true, |g| !termios.input_flags.intersects(g - *self))
|
||||||
|
@ -519,6 +523,8 @@ impl TermiosFlag for InputFlags {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl TermiosFlag for OutputFlags {
|
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 {
|
fn is_in(&self, termios: &Termios, group: Option<Self>) -> bool {
|
||||||
termios.output_flags.contains(*self)
|
termios.output_flags.contains(*self)
|
||||||
&& group.map_or(true, |g| !termios.output_flags.intersects(g - *self))
|
&& group.map_or(true, |g| !termios.output_flags.intersects(g - *self))
|
||||||
|
@ -530,6 +536,8 @@ impl TermiosFlag for OutputFlags {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl TermiosFlag for LocalFlags {
|
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 {
|
fn is_in(&self, termios: &Termios, group: Option<Self>) -> bool {
|
||||||
termios.local_flags.contains(*self)
|
termios.local_flags.contains(*self)
|
||||||
&& group.map_or(true, |g| !termios.local_flags.intersects(g - *self))
|
&& group.map_or(true, |g| !termios.local_flags.intersects(g - *self))
|
||||||
|
|
|
@ -814,7 +814,7 @@ impl FsMeta for StatFs {
|
||||||
fn fsid(&self) -> u64 {
|
fn fsid(&self) -> u64 {
|
||||||
let f_fsid: &[u32; 2] =
|
let f_fsid: &[u32; 2] =
|
||||||
unsafe { &*(&self.f_fsid as *const nix::sys::statfs::fsid_t as *const [u32; 2]) };
|
unsafe { &*(&self.f_fsid as *const nix::sys::statfs::fsid_t as *const [u32; 2]) };
|
||||||
(u64::from(f_fsid[0])) << 32 | u64::from(f_fsid[1])
|
((u64::from(f_fsid[0])) << 32) | u64::from(f_fsid[1])
|
||||||
}
|
}
|
||||||
#[cfg(not(any(
|
#[cfg(not(any(
|
||||||
target_vendor = "apple",
|
target_vendor = "apple",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue