Skip to content

Commit

Permalink
chore: Bump indicatif from 0.15.0 to 0.16.0
Browse files Browse the repository at this point in the history
Bumps [indicatif](https://github.com/mitsuhiko/indicatif) from 0.15.0 to 0.16.0.
- [Release notes](https://github.com/mitsuhiko/indicatif/releases)
- [Commits](https://github.com/mitsuhiko/indicatif/commits)

Signed-off-by: dependabot[bot] <support@github.com>
  • Loading branch information
dependabot[bot] authored and Herschel committed May 3, 2021
1 parent 185a4f5 commit 860f26e
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 17 deletions.
8 changes: 4 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion exporter/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ log = "0.4"
futures = "0.3.14"
path-slash = "0.1.4"
walkdir = "2.3.2"
indicatif = "0.15"
indicatif = "0.16"

[features]
avm_debug = ["ruffle_core/avm_debug"]
Expand Down
20 changes: 13 additions & 7 deletions exporter/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ fn take_screenshot(

for i in 0..totalframes {
if let Some(progress) = &progress {
progress.set_message(&format!(
progress.set_message(format!(
"{} frame {}",
swf_path.file_stem().unwrap().to_string_lossy(),
i
Expand Down Expand Up @@ -182,13 +182,13 @@ fn find_files(root: &Path, with_progress: bool) -> Vec<DirEntry> {
if f_name.ends_with(".swf") {
results.push(entry);
if let Some(progress) = &progress {
progress.set_message(&format!("Searching for swf files... {}", results.len()));
progress.set_message(format!("Searching for swf files... {}", results.len()));
}
}
}

if let Some(progress) = &progress {
progress.finish_with_message(&format!("Found {} swf files to export", results.len()));
progress.finish_with_message(format!("Found {} swf files to export", results.len()));
}

results
Expand Down Expand Up @@ -232,7 +232,7 @@ fn capture_single_swf(descriptors: Descriptors, opt: &Opt) -> Result<(), Box<dyn
)?;

if let Some(progress) = &progress {
progress.set_message(&opt.swf.file_stem().unwrap().to_string_lossy());
progress.set_message(opt.swf.file_stem().unwrap().to_string_lossy().into_owned());
}

if frames.len() == 1 {
Expand Down Expand Up @@ -261,7 +261,7 @@ fn capture_single_swf(descriptors: Descriptors, opt: &Opt) -> Result<(), Box<dyn
};

if let Some(progress) = progress {
progress.finish_with_message(&message);
progress.finish_with_message(message);
} else {
println!("{}", message);
}
Expand Down Expand Up @@ -300,7 +300,13 @@ fn capture_multiple_swfs(mut descriptors: Descriptors, opt: &Opt) -> Result<(),
descriptors = new_descriptors;

if let Some(progress) = &progress {
progress.set_message(&file.path().file_stem().unwrap().to_string_lossy());
progress.set_message(
file.path()
.file_stem()
.unwrap()
.to_string_lossy()
.into_owned(),
);
}

let mut relative_path = file
Expand Down Expand Up @@ -346,7 +352,7 @@ fn capture_multiple_swfs(mut descriptors: Descriptors, opt: &Opt) -> Result<(),
};

if let Some(progress) = progress {
progress.finish_with_message(&message);
progress.finish_with_message(message);
} else {
println!("{}", message);
}
Expand Down
2 changes: 1 addition & 1 deletion scanner/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ log = "0.4"
walkdir = "2.3.2"
serde = { version = "1.0", features = ["derive"] }
csv = "1.1"
indicatif = "0.15"
indicatif = "0.16"
path-slash = "0.1.4"
8 changes: 4 additions & 4 deletions scanner/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ fn find_files(root: &Path, ignore: &[String]) -> Vec<DirEntry> {

if f_name.ends_with(".swf") && !ignore.iter().any(|x| x == &f_name) {
results.push(entry);
progress.set_message(&format!("Searching for swf files... {}", results.len()));
progress.set_message(format!("Searching for swf files... {}", results.len()));
}
}

progress.finish_with_message(&format!("Found {} swf files to scan", results.len()));
progress.finish_with_message(format!("Found {} swf files to scan", results.len()));
results
}

Expand Down Expand Up @@ -115,7 +115,7 @@ fn main() -> Result<(), std::io::Error> {
.unwrap_or_else(|_| file.path())
.to_slash_lossy();
progress.inc(1);
progress.set_message(&name);
progress.set_message(name.clone());
let result = scan_file(file, name);

if result.error.is_none() {
Expand All @@ -127,7 +127,7 @@ fn main() -> Result<(), std::io::Error> {
writer.serialize(result)?;
}

progress.finish_with_message(&format!(
progress.finish_with_message(format!(
"Scanned {} swf files. {} successfully parsed, {} encountered errors",
total, good, bad
));
Expand Down

0 comments on commit 860f26e

Please sign in to comment.