Skip to content

Commit

Permalink
AAA
Browse files Browse the repository at this point in the history
  • Loading branch information
qarmin committed Jan 6, 2025
1 parent 88b17bc commit b1447dc
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 13 deletions.
1 change: 1 addition & 0 deletions czkawka_cli/src/progress.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ pub fn get_progress_bar_for_collect_files() -> ProgressBar {
let pb = ProgressBar::new_spinner();
pb.enable_steady_tick(Duration::from_millis(120));
pb.set_style(
#[allow(clippy::literal_string_with_formatting_args)]
ProgressStyle::with_template("{msg} {spinner:.blue}")
.expect("Failed to create progress bar style")
.tick_strings(&["▹▹▹▹▹", "▸▹▹▹▹", "▹▸▹▹▹", "▹▹▸▹▹", "▹▹▹▸▹", "▹▹▹▹▸", "▪▪▪▪▪"]),
Expand Down
6 changes: 2 additions & 4 deletions czkawka_core/src/common_image.rs
Original file line number Diff line number Diff line change
Expand Up @@ -219,11 +219,9 @@ pub fn get_rotation_from_exif(path: &str) -> Result<Option<ExifOrientation>, nom
Ok(None)
});

let res = res.unwrap_or_else(|_| {
res.unwrap_or_else(|_| {
let message = create_crash_message("nom-exif", path, "https://github.com/mindeng/nom-exif");
println!("{message}");
Err(nom_exif::Error::IOError(std::io::Error::new(std::io::ErrorKind::Other, "Panic in get_rotation_from_exif")))
});

res
})
}
15 changes: 6 additions & 9 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,10 @@ fix:
cargo +nightly fmt
cargo clippy --fix --allow-dirty --allow-staged -- -Wclippy::bool_to_int_with_if -Wclippy::expl_impl_clone_on_copy -Wclippy::explicit_into_iter_loop -Wclippy::explicit_iter_loop -Wclippy::filter_map_next -Wclippy::flat_map_option -Wclippy::float_cmp -Wclippy::from_iter_instead_of_collect -Wclippy::ignored_unit_patterns -Wclippy::implicit_clone -Wclippy::index_refutable_slice -Wclippy::invalid_upcast_comparisons -Wclippy::iter_filter_is_ok -Wclippy::iter_filter_is_some -Wclippy::large_stack_arrays -Wclippy::large_types_passed_by_value -Wclippy::macro_use_imports -Wclippy::manual_assert -Wclippy::manual_instant_elapsed -Wclippy::manual_is_power_of_two -Wclippy::manual_is_variant_and -Wclippy::manual_let_else -Wclippy::manual_ok_or -Wclippy::map_unwrap_or -Wclippy::match_bool -Wclippy::match_on_vec_items -Wclippy::match_same_arms -Wclippy::match_wildcard_for_single_variants -Wclippy::mut_mut -Wclippy::needless_bitwise_bool -Wclippy::needless_continue -Wclippy::needless_for_each -Wclippy::needless_pass_by_value -Wclippy::option_as_ref_cloned -Wclippy::range_minus_one -Wclippy::range_plus_one -Wclippy::redundant_else -Wclippy::ref_binding_to_reference -Wclippy::ref_option -Wclippy::ref_option_ref -Wclippy::same_functions_in_if_condition -Wclippy::semicolon_if_nothing_returned -Wclippy::stable_sort_primitive -Wclippy::str_split_at_newline -Wclippy::string_add_assign -Wclippy::uninlined_format_args -Wclippy::unnecessary_box_returns -Wclippy::unnecessary_join -Wclippy::unnecessary_wraps -Wclippy::unnested_or_patterns -Wclippy::used_underscore_binding -Wclippy::used_underscore_items -Aclippy::match_same_arms
cargo +nightly fmt
# -Wclippy::missing_panics_doc
# -Wclippy::missing_panics_doc

clippy_nightly:
cargo clippy -- -Wclippy::pedantic -Aclippy::default_trait_access -Aclippy::cast_possible_truncation -Aclippy::must_use_candidate -Aclippy::missing_panics_doc -Aclippy::too_many_lines -Aclippy::cast_precision_loss -Aclippy::cast_sign_loss -Aclippy::module_name_repetitions -Aclippy::struct_excessive_bools -Aclippy::cast_possible_wrap -Aclippy::cast_lossless -Aclippy::if_not_else -Aclippy::wildcard_imports -Aclippy::return_self_not_must_use -Aclippy::missing_errors_doc -Aclippy::match_wildcard_for_single_variants -Aclippy::assigning_clones -Aclippy::unused_self -Aclippy::manual_is_variant_and -Aclippy::new_without_default

# To re-enable
# if_not_else
# unused_self
# manual_is_variant_and - generated by slint code
# new_without_default
fix_nightly:
cargo +nightly fmt
cargo +nightly clippy --fix --allow-dirty --allow-staged -- -Wclippy::bool_to_int_with_if -Wclippy::expl_impl_clone_on_copy -Wclippy::explicit_into_iter_loop -Wclippy::explicit_iter_loop -Wclippy::filter_map_next -Wclippy::flat_map_option -Wclippy::float_cmp -Wclippy::from_iter_instead_of_collect -Wclippy::ignored_unit_patterns -Wclippy::implicit_clone -Wclippy::index_refutable_slice -Wclippy::invalid_upcast_comparisons -Wclippy::iter_filter_is_ok -Wclippy::iter_filter_is_some -Wclippy::large_stack_arrays -Wclippy::large_types_passed_by_value -Wclippy::macro_use_imports -Wclippy::manual_assert -Wclippy::manual_instant_elapsed -Wclippy::manual_is_power_of_two -Wclippy::manual_is_variant_and -Wclippy::manual_let_else -Wclippy::manual_ok_or -Wclippy::map_unwrap_or -Wclippy::match_bool -Wclippy::match_on_vec_items -Wclippy::match_same_arms -Wclippy::match_wildcard_for_single_variants -Wclippy::mut_mut -Wclippy::needless_bitwise_bool -Wclippy::needless_continue -Wclippy::needless_for_each -Wclippy::needless_pass_by_value -Wclippy::option_as_ref_cloned -Wclippy::range_minus_one -Wclippy::range_plus_one -Wclippy::redundant_else -Wclippy::ref_binding_to_reference -Wclippy::ref_option -Wclippy::ref_option_ref -Wclippy::same_functions_in_if_condition -Wclippy::semicolon_if_nothing_returned -Wclippy::stable_sort_primitive -Wclippy::str_split_at_newline -Wclippy::string_add_assign -Wclippy::uninlined_format_args -Wclippy::unnecessary_box_returns -Wclippy::unnecessary_join -Wclippy::unnecessary_wraps -Wclippy::unnested_or_patterns -Wclippy::used_underscore_binding -Wclippy::used_underscore_items -Aclippy::match_same_arms
cargo +nightly fmt
# -Wclippy::missing_panics_doc

0 comments on commit b1447dc

Please sign in to comment.