From b1447dcba97901313d1382751483a0ce4b5713ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Mikrut?= Date: Mon, 6 Jan 2025 11:19:44 +0100 Subject: [PATCH] AAA --- czkawka_cli/src/progress.rs | 1 + czkawka_core/src/common_image.rs | 6 ++---- justfile | 15 ++++++--------- 3 files changed, 9 insertions(+), 13 deletions(-) diff --git a/czkawka_cli/src/progress.rs b/czkawka_cli/src/progress.rs index 1377d0b9..0958036f 100644 --- a/czkawka_cli/src/progress.rs +++ b/czkawka_cli/src/progress.rs @@ -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(&["▹▹▹▹▹", "▸▹▹▹▹", "▹▸▹▹▹", "▹▹▸▹▹", "▹▹▹▸▹", "▹▹▹▹▸", "▪▪▪▪▪"]), diff --git a/czkawka_core/src/common_image.rs b/czkawka_core/src/common_image.rs index 4427d9da..9c37f750 100644 --- a/czkawka_core/src/common_image.rs +++ b/czkawka_core/src/common_image.rs @@ -219,11 +219,9 @@ pub fn get_rotation_from_exif(path: &str) -> Result, 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 + }) } diff --git a/justfile b/justfile index b210900c..2346bd70 100644 --- a/justfile +++ b/justfile @@ -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 \ No newline at end of file +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