Task #130792 - fixed.err

back to task #130792
download
Error: CLIPPY_WARNING:
src/cache/check.rs:325:53: warning: called `unwrap` on `err` after checking its variant with `is_some`
#      |
#  324 |                 if err.is_some() {
#      |                 ---------------- help: try: `if let Some(<item>) = err`
#  325 |                     ctx.report.fatal(&format!("{}", err.unwrap()));
#      |                                                     ^^^^^^^^^^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.97.0/index.html#unnecessary_unwrap
#      = note: `#[warn(clippy::unnecessary_unwrap)]` on by default

Error: CLIPPY_WARNING:
src/cache/check.rs:361:45: warning: called `unwrap` on `err` after checking its variant with `is_some`
#      |
#  360 |         if err.is_some() {
#      |         ---------------- help: try: `if let Some(<item>) = err`
#  361 |             ctx.report.fatal(&format!("{}", err.unwrap()));
#      |                                             ^^^^^^^^^^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.97.0/index.html#unnecessary_unwrap

Error: CLIPPY_WARNING:
src/cache/dump.rs:209:55: warning: called `unwrap` on `errs` after checking its variant with `is_some`
#      |
#  208 |         if errs.is_some() && !repair {
#      |            -------------- the check is happening here
#  209 |             return Err(anyhow!("errors in bitset {}", errs.unwrap()));
#      |                                                       ^^^^^^^^^^^^^
#      |
#      = help: try using `match`
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.97.0/index.html#unnecessary_unwrap

Error: CLIPPY_WARNING:
src/cache/dump.rs:372:30: warning: called `unwrap` on `opts.output` after checking its variant with `is_some`
#      |
#  371 |     let writer: Box<dyn Write> = if opts.output.is_some() {
#      |                                  ------------------------ help: try: `if let Some(<item>) = opts.output`
#  372 |         let f = File::create(opts.output.unwrap()).context(OutputError)?;
#      |                              ^^^^^^^^^^^^^^^^^^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.97.0/index.html#unnecessary_unwrap

Error: CLIPPY_WARNING:
src/cache/superblock.rs:200:37: warning: called `unwrap` on `sb.dirty_root` after checking its variant with `is_some`
#      |
#  199 |     if sb.dirty_root.is_some() {
#      |     -------------------------- help: try: `if let Some(<item>) = sb.dirty_root`
#  200 |         w.write_u64::<LittleEndian>(sb.dirty_root.unwrap())?;
#      |                                     ^^^^^^^^^^^^^^^^^^^^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.97.0/index.html#unnecessary_unwrap

Error: CLIPPY_WARNING:
src/copier/batcher.rs:49:9: warning: consider using `sort_by_key`
#     |
#  49 |         ops.sort_by(|lhs, rhs| lhs.dst.cmp(&rhs.dst));
#     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#     |
#     = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.97.0/index.html#unnecessary_sort_by
#     = note: `#[warn(clippy::unnecessary_sort_by)]` on by default
#  help: try
#     |
#  49 -         ops.sort_by(|lhs, rhs| lhs.dst.cmp(&rhs.dst));
#  49 +         ops.sort_by_key(|lhs| lhs.dst);
#     |

Error: CLIPPY_WARNING:
src/copier/sync_copier.rs:140:9: warning: consider using `sort_by_key`
#      |
#  140 |         reads.sort_by(|lhs, rhs| lhs.block_begin.cmp(&rhs.block_begin));
#      |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.97.0/index.html#unnecessary_sort_by
#  help: try
#      |
#  140 -         reads.sort_by(|lhs, rhs| lhs.block_begin.cmp(&rhs.block_begin));
#  140 +         reads.sort_by_key(|lhs| lhs.block_begin);
#      |

Error: CLIPPY_WARNING:
src/copier/sync_copier.rs:205:9: warning: consider using `sort_by_key`
#      |
#  205 |         writes.sort_by(|lhs, rhs| lhs.block_begin.cmp(&rhs.block_begin));
#      |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.97.0/index.html#unnecessary_sort_by
#  help: try
#      |
#  205 -         writes.sort_by(|lhs, rhs| lhs.block_begin.cmp(&rhs.block_begin));
#  205 +         writes.sort_by_key(|lhs| lhs.block_begin);
#      |

Error: CLIPPY_WARNING:
src/era/check.rs:127:45: warning: called `unwrap` on `err` after checking its variant with `is_some`
#      |
#  126 |         if err.is_some() {
#      |         ---------------- help: try: `if let Some(<item>) = err`
#  127 |             ctx.report.fatal(&format!("{}", err.unwrap()));
#      |                                             ^^^^^^^^^^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.97.0/index.html#unnecessary_unwrap

Error: CLIPPY_WARNING:
src/era/dump.rs:462:30: warning: called `unwrap` on `opts.output` after checking its variant with `is_some`
#      |
#  461 |     let writer: Box<dyn Write> = if opts.output.is_some() {
#      |                                  ------------------------ help: try: `if let Some(<item>) = opts.output`
#  462 |         let f = File::create(opts.output.unwrap()).context(OutputError)?;
#      |                              ^^^^^^^^^^^^^^^^^^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.97.0/index.html#unnecessary_unwrap

Error: CLIPPY_WARNING:
src/era/invalidate.rs:258:46: warning: called `unwrap` on `opts.output` after checking its variant with `is_some`
#      |
#  257 |     let w: Box<dyn Write> = if opts.output.is_some() {
#      |                             ------------------------ help: try: `if let Some(<item>) = opts.output`
#  258 |         Box::new(BufWriter::new(File::create(opts.output.unwrap())?))
#      |                                              ^^^^^^^^^^^^^^^^^^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.97.0/index.html#unnecessary_unwrap

Error: CLIPPY_WARNING:
src/pdata/space_map/aggregator_load.rs:163:21: warning: the variable `blocknr` is used as a loop counter
#      |
#  163 |                     for e in bitmap.entries.iter() {
#      |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `for (blocknr, e) in (block_index * ENTRIES_PER_BITMAP as u64..).zip(bitmap.entries.iter())`
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.97.0/index.html#explicit_counter_loop
#      = note: `#[warn(clippy::explicit_counter_loop)]` on by default

Error: CLIPPY_WARNING:
src/pdata/space_map/repairer.rs:36:13: warning: the variable `blocknr` is used as a loop counter
#     |
#  36 |             for e in bitmap.entries.iter_mut() {
#     |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `for (blocknr, e) in (be.blocknr..).zip(bitmap.entries.iter_mut())`
#     |
#     = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.97.0/index.html#explicit_counter_loop

Error: CLIPPY_WARNING:
src/thin/dump.rs:413:30: warning: called `unwrap` on `opts.output` after checking its variant with `is_some`
#      |
#  412 |     let writer: Box<dyn Write> = if opts.output.is_some() {
#      |                                  ------------------------ help: try: `if let Some(<item>) = opts.output`
#  413 |         let f = File::create(opts.output.unwrap()).context(OutputError)?;
#      |                              ^^^^^^^^^^^^^^^^^^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.97.0/index.html#unnecessary_unwrap