Task #90760 - fixed.err
back to task #90760download
Error: CLIPPY_WARNING:
src/cache/dump.rs:125:29: warning: this pattern reimplements `Option::unwrap_or`
# |
# 125 | let dirty = if let Some(bit) = inner.dirty_bits.contains(cblock as usize) {
# | _____________________________^
# 126 | | bit
# 127 | | } else {
# ... |
# 130 | | };
# | |_________________^ help: replace with: `inner.dirty_bits.contains(cblock as usize).unwrap_or(true)`
# |
# = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#manual_unwrap_or
# = note: `#[warn(clippy::manual_unwrap_or)]` on by default
Error: CLIPPY_WARNING:
src/cache/dump.rs:153:86: warning: hiding a lifetime that's named elsewhere is confusing
# |
# 153 | pub fn new(emitter: &'a mut dyn MetadataVisitor, valid_mappings: FixedBitSet) -> HintEmitter {
# | -- the lifetime is named here ^^^^^^^^^^^ the same lifetime is hidden here
# |
# = help: the same lifetime is referred to in inconsistent ways, making the signature confusing
# = note: `#[warn(mismatched_lifetime_syntaxes)]` on by default
# help: consistently use `'a`
# |
# 153 | pub fn new(emitter: &'a mut dyn MetadataVisitor, valid_mappings: FixedBitSet) -> HintEmitter<'a> {
# | ++++
Error: CLIPPY_WARNING:
src/commands/utils.rs:166:30: warning: this `map_or` can be simplified
# |
# 166 | let is_broken_pipe = root_cause
# | ______________________________^
# 167 | | .downcast_ref::<Arc<std::io::Error>>() // quick_xml::Error::Io wraps io::Error in Arc
# 168 | | .map_or_else(
# 169 | | || root_cause.downcast_ref::<std::io::Error>(),
# ... |
# 172 | | .map_or(false, |err| err.kind() == std::io::ErrorKind::BrokenPipe);
# | |______________________________________________________________________________^
# |
# = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#unnecessary_map_or
# = note: `#[warn(clippy::unnecessary_map_or)]` on by default
# help: use is_some_and instead
# |
# 172 - .map_or(false, |err| err.kind() == std::io::ErrorKind::BrokenPipe);
# 172 + .is_some_and(|err| err.kind() == std::io::ErrorKind::BrokenPipe);
# |
Error: CLIPPY_WARNING:
src/era/dump.rs:29:57: warning: hiding a lifetime that's named elsewhere is confusing
# |
# 29 | pub fn new(emitter: &'a mut dyn MetadataVisitor) -> EraEmitter {
# | -- the lifetime is named here ^^^^^^^^^^ the same lifetime is hidden here
# |
# = help: the same lifetime is referred to in inconsistent ways, making the signature confusing
# help: consistently use `'a`
# |
# 29 | pub fn new(emitter: &'a mut dyn MetadataVisitor) -> EraEmitter<'a> {
# | ++++
Error: CLIPPY_WARNING:
src/file_utils.rs:49:13: warning: this can be `std::io::Error::other(_)`
# |
# 49 | let e = io::Error::new(io::ErrorKind::Other, msg);
# | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
# |
# = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#io_other_error
# = note: `#[warn(clippy::io_other_error)]` on by default
# help: use `std::io::Error::other`
# |
# 49 - let e = io::Error::new(io::ErrorKind::Other, msg);
# 49 + let e = io::Error::other(msg);
# |
Error: CLIPPY_WARNING:
src/io_engine/spindle.rs:27:1: warning: empty lines after doc comment
# |
# 27 | / /// Writes or reads to blocks not in the space map fall back to sync io.
# ... |
# 30 | |
# | |_^
# 31 | fn pack_block<W: io::Write>(w: &mut W, kind: BT, buf: &[u8]) -> Result<()> {
# | ------------- the comment documents this function
# |
# = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#empty_line_after_doc_comments
# = note: `#[warn(clippy::empty_line_after_doc_comments)]` on by default
# = help: if the empty lines are unintentional, remove them
# help: if the doc comment should not document function `pack_block` then comment it out
# |
# 22 ~ // /// Examining BTrees can lead to a lot of random io, which can be
# 23 ~ // /// very slow on spindle devices. This io engine reads in all
# 24 ~ // /// metadata blocks of interest (we know these from the metadata
# 25 ~ // /// space map), compresses them and caches them in memory. This
# 26 ~ // /// greatly speeds up performance but obviously uses a lot of memory.
# 27 ~ // /// Writes or reads to blocks not in the space map fall back to sync io.
# |
Error: CLIPPY_WARNING:
src/io_engine/spindle.rs:151:46: warning: this can be `std::io::Error::other(_)`
# |
# 151 | unpack_block(z, loc).map_err(|_| io::Error::new(io::ErrorKind::Other, "unpack failed"))
# | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
# |
# = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#io_other_error
# help: use `std::io::Error::other`
# |
# 151 - unpack_block(z, loc).map_err(|_| io::Error::new(io::ErrorKind::Other, "unpack failed"))
# 151 + unpack_block(z, loc).map_err(|_| io::Error::other("unpack failed"))
# |
Error: CLIPPY_WARNING:
src/io_engine/sync.rs:48:13: warning: this can be `std::io::Error::other(_)`
# |
# 48 | Err(io::Error::new(io::ErrorKind::Other, "read failed"))
# | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
# |
# = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#io_other_error
# help: use `std::io::Error::other`
# |
# 48 - Err(io::Error::new(io::ErrorKind::Other, "read failed"))
# 48 + Err(io::Error::other("read failed"))
# |
Error: CLIPPY_WARNING:
src/io_engine/sync.rs:52:9: warning: this can be `std::io::Error::other(_)`
# |
# 52 | io::Error::new(io::ErrorKind::Other, "write failed")
# | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
# |
# = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#io_other_error
# help: use `std::io::Error::other`
# |
# 52 - io::Error::new(io::ErrorKind::Other, "write failed")
# 52 + io::Error::other("write failed")
# |
Error: CLIPPY_WARNING:
src/pack/node_encode.rs:16:18: warning: value assigned to `source` is never read
# |
# 16 | WriteError { source: std::io::Error },
# | ^^^^^^
# |
# = help: maybe it is overwritten before being read?
# = note: `#[warn(unused_assignments)]` (part of `#[warn(unused)]`) on by default
Error: CLIPPY_WARNING:
src/pack/toplevel.rs:29:18: warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do
# |
# 29 | fn shuffle<T>(v: &mut Vec<T>) {
# | ^^^^^^^^^^^ help: change this to: `&mut [T]`
# |
# = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#ptr_arg
# = note: `#[warn(clippy::ptr_arg)]` on by default
Error: CLIPPY_WARNING:
src/pdata/bitset.rs:145:15: warning: manual implementation of `err`
# |
# 145 | let err = match w.walk(&v, root) {
# | _______________^
# 146 | | Ok(()) => None,
# 147 | | Err(e) => Some(e),
# 148 | | };
# | |_____^ help: replace with: `w.walk(&v, root).err()`
# |
# = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#manual_ok_err
# = note: `#[warn(clippy::manual_ok_err)]` on by default
Error: CLIPPY_WARNING:
src/pdata/bitset.rs:162:15: warning: manual implementation of `err`
# |
# 162 | let err = match w.walk(&v, root) {
# | _______________^
# 163 | | Ok(()) => None,
# 164 | | Err(e) => Some(e),
# 165 | | };
# | |_____^ help: replace with: `w.walk(&v, root).err()`
# |
# = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#manual_ok_err
Error: CLIPPY_WARNING:
src/thin/ls.rs:144:67: warning: hiding a lifetime that's named elsewhere is confusing
# |
# 144 | fn new(fields: &'a [OutputField], nr_rows: usize, bs: u32) -> LsTable {
# | -- the lifetime is named here ^^^^^^^ the same lifetime is hidden here
# |
# = help: the same lifetime is referred to in inconsistent ways, making the signature confusing
# help: consistently use `'a`
# |
# 144 | fn new(fields: &'a [OutputField], nr_rows: usize, bs: u32) -> LsTable<'a> {
# | ++++
Error: CLIPPY_WARNING:
src/thin/trim.rs:29:60: warning: hiding a lifetime that's named elsewhere is confusing
# |
# 29 | fn new(bitmaps: &'a [Block], nr_blocks: u64) -> Result<RangeIterator> {
# | -- the lifetime is named here ^^^^^^^^^^^^^ the same lifetime is hidden here
# |
# = help: the same lifetime is referred to in inconsistent ways, making the signature confusing
# help: consistently use `'a`
# |
# 29 | fn new(bitmaps: &'a [Block], nr_blocks: u64) -> Result<RangeIterator<'a>> {
# | ++++
Error: CLIPPY_WARNING:
src/utils/hashvec.rs:63:19: warning: hiding a lifetime that's elided elsewhere is confusing
# |
# 63 | pub fn values(&self) -> std::slice::Iter<T> {
# | ^^^^^ ^^^^^^^^^^^^^^^^^^^ the same lifetime is hidden here
# | |
# | the lifetime is elided here
# |
# = help: the same lifetime is referred to in inconsistent ways, making the signature confusing
# help: use `'_` for type paths
# |
# 63 | pub fn values(&self) -> std::slice::Iter<'_, T> {
# | +++
Error: CLIPPY_WARNING:
src/xml.rs:58:33: warning: hiding a lifetime that's elided elsewhere is confusing
# |
# 58 | pub fn mk_attr<T: Display>(key: &[u8], value: T) -> Attribute {
# | ^^^^^ ^^^^^^^^^ the same lifetime is hidden here
# | |
# | the lifetime is elided here
# |
# = help: the same lifetime is referred to in inconsistent ways, making the signature confusing
# help: use `'_` for type paths
# |
# 58 | pub fn mk_attr<T: Display>(key: &[u8], value: T) -> Attribute<'_> {
# | ++++