-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Housekeeping/clippy 2 #34
Conversation
You're gonna want to look at the recent commits. |
Looks good except that in this should be called if the function returns at any point after the progress bar is created. |
I'd like to add that this is a draft: will complete laterrrrr. |
then make the PR a draft 🤓 |
@toastxc Resolved merge conflicts :3 |
src/extract.rs
Outdated
let decoder = ZstdDecoder::new(zstd_file)?; | ||
// estimate extracted size as x2 since idk how to get the decompressed size with | ||
// zstd | ||
let pb_decompress = ProgressBar::new((zstd_file_length.clone() * 2) as u64); | ||
let pb_decompress = ProgressBar::new((*zstd_file_length * 2)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: unnecessary parentheses around function argument
--> src\extract.rs:121:46
|
121 | let pb_decompress = ProgressBar::new((*zstd_file_length * 2));
| ^ ^
|
= note: `#[warn(unused_parens)]` on by default
help: remove these parentheses
|
121 - let pb_decompress = ProgressBar::new((*zstd_file_length * 2));
121 + let pb_decompress = ProgressBar::new(*zstd_file_length * 2);
|
} | ||
Err(e) => | ||
{ | ||
Err(error) => { | ||
return Err(BeansError::TarExtractFailure { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pb.finish();
should be called before return Err(
} | ||
} | ||
if let Err(error) = x.unpack_in(&output_directory) { | ||
return Err(BeansError::TarUnpackItemFailure { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pb.finish();
should be called before return Err(
let entries = match archive.entries() { | ||
Ok(a) => a, | ||
Err(error) => { | ||
return Err(BeansError::TarExtractFailure { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pb.finish();
should be called before return Err(
No description provided.