restore: Download multiple contiguous blobs in one request #1463
This check has been archived and is scheduled for deletion.
Learn more about checks retention
GitHub Actions / Clippy Output
failed
Jun 19, 2023 in 1s
Clippy Output
4 errors
Details
Results
Message level | Amount |
---|---|
Internal compiler error | 0 |
Error | 4 |
Warning | 0 |
Note | 0 |
Help | 0 |
Versions
- rustc 1.70.0 (90c541806 2023-05-31)
- cargo 1.70.0 (ec8a8a0ca 2023-04-25)
- clippy 0.1.70 (90c5418 2023-05-31)
Annotations
Check failure on line 623 in src/commands/restore.rs
github-actions / Clippy Output
use Option::map_or instead of an if let/else
error: use Option::map_or instead of an if let/else
--> src/commands/restore.rs:616:27
|
616 | let matches = match &mut open_file {
| ___________________________^
617 | | Some(file) => {
618 | | // Existing file content; check if SHA256 matches
619 | | let mut vec = vec![0; length as usize];
... |
622 | | None => false,
623 | | };
| |_____________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_if_let_else
help: try
|
616 ~ let matches = open_file.as_mut().map_or(false, |file| {
617 + // Existing file content; check if SHA256 matches
618 + let mut vec = vec![0; length as usize];
619 + file.read_exact(&mut vec).is_ok() && id == &hash(&vec)
620 ~ });
|
Check failure on line 544 in src/commands/restore.rs
github-actions / Clippy Output
use Option::map_or instead of an if let/else
error: use Option::map_or instead of an if let/else
--> src/commands/restore.rs:541:9
|
541 | / match self.uncompressed_length {
542 | | None => self.length - 32, // crypto overhead
543 | | Some(length) => length.get(),
544 | | }
| |_________^ help: try: `self.uncompressed_length.map_or(self.length - 32, |length| length.get())`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_if_let_else
= note: `-D clippy::option-if-let-else` implied by `-D warnings`
Check failure on line 623 in src/commands/restore.rs
github-actions / Clippy Output
use Option::map_or instead of an if let/else
error: use Option::map_or instead of an if let/else
--> src/commands/restore.rs:616:27
|
616 | let matches = match &mut open_file {
| ___________________________^
617 | | Some(file) => {
618 | | // Existing file content; check if SHA256 matches
619 | | let mut vec = vec![0; length as usize];
... |
622 | | None => false,
623 | | };
| |_____________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_if_let_else
help: try
|
616 ~ let matches = open_file.as_mut().map_or(false, |file| {
617 + // Existing file content; check if SHA256 matches
618 + let mut vec = vec![0; length as usize];
619 + file.read_exact(&mut vec).is_ok() && id == &hash(&vec)
620 ~ });
|
Check failure on line 544 in src/commands/restore.rs
github-actions / Clippy Output
use Option::map_or instead of an if let/else
error: use Option::map_or instead of an if let/else
--> src/commands/restore.rs:541:9
|
541 | / match self.uncompressed_length {
542 | | None => self.length - 32, // crypto overhead
543 | | Some(length) => length.get(),
544 | | }
| |_________^ help: try: `self.uncompressed_length.map_or(self.length - 32, |length| length.get())`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_if_let_else
= note: `-D clippy::option-if-let-else` implied by `-D warnings`
Loading