From a7969c900b4915ff129aa1f38b53f216b67a4d7c Mon Sep 17 00:00:00 2001 From: Oscar Wallberg Date: Thu, 26 Feb 2026 02:42:36 +0100 Subject: [PATCH] fix(rust): update config --- rust/Cargo.toml | 19 +++---------------- rust/clippy.toml | 5 ++--- 2 files changed, 5 insertions(+), 19 deletions(-) diff --git a/rust/Cargo.toml b/rust/Cargo.toml index ea2794e..3bbb901 100644 --- a/rust/Cargo.toml +++ b/rust/Cargo.toml @@ -29,14 +29,15 @@ unused_qualifications = "warn" unused_results = "warn" [lints.clippy] -pedantic = "warn" +# pedantic +pedantic = { level = "warn", priority = -1 } +similar_names = "allow" # restriction absolute_paths = "warn" alloc_instead_of_core = "warn" allow_attributes = "warn" allow_attributes_without_reason = "warn" -arbitrary_source_item_ordering = "warn" as_pointer_underscore = "warn" as_underscore = "warn" assertions_on_result_states = "warn" @@ -45,22 +46,17 @@ clone_on_ref_ptr = "warn" create_dir = "warn" dbg_macro = "warn" decimal_literal_representation = "warn" -default_numeric_fallback = "warn" default_union_representation = "warn" doc_include_without_cfg = "warn" doc_paragraphs_missing_punctuation = "warn" -else_if_without_else = "warn" empty_enum_variants_with_brackets = "warn" empty_structs_with_brackets = "warn" error_impl_error = "warn" exit = "warn" field_scoped_visibility_modifiers = "warn" float_cmp_const = "warn" -fn_to_numeric_cast_any = "warn" get_unwrap = "warn" -if_then_some_else_none = "warn" impl_trait_in_params = "warn" -indexing_slicing = "warn" infinite_loop = "warn" let_underscore_must_use = "warn" lossy_float_literal = "warn" @@ -69,9 +65,7 @@ map_with_unused_argument_over_ranges = "warn" mem_forget = "warn" missing_assert_message = "warn" missing_asserts_for_indexing = "warn" -missing_docs_in_private_items = "warn" missing_inline_in_public_items = "warn" -module_name_repetitions = "warn" multiple_inherent_impl = "warn" multiple_unsafe_ops_per_block = "warn" mutex_atomic = "warn" @@ -80,7 +74,6 @@ non_zero_suggestions = "warn" panic = "warn" partial_pub_fields = "warn" pathbuf_init_then_push = "warn" -pattern_type_mismatch = "warn" pointer_format = "warn" precedence_bits = "warn" pub_use = "warn" @@ -94,15 +87,9 @@ rest_pat_in_fully_bound_structs = "warn" return_and_then = "warn" same_name_method = "warn" self_named_module_files = "warn" -semicolon_inside_block = "warn" -shadow_reuse = "warn" -shadow_same = "warn" -shadow_unrelated = "warn" -single_char_lifetime_names = "warn" str_to_string = "warn" string_add = "warn" string_lit_chars_any = "warn" -string_slice = "warn" suspicious_xor_used_as_pow = "warn" tests_outside_test_module = "warn" todo = "warn" diff --git a/rust/clippy.toml b/rust/clippy.toml index d31aaf9..2b63244 100644 --- a/rust/clippy.toml +++ b/rust/clippy.toml @@ -1,4 +1,3 @@ -check-private-items = true trait-assoc-item-kinds-order = ["const", "type", "fn"] module-item-order-groupings = [ ["modules", ["extern_crate", "mod", "foreign_mod"]], @@ -9,6 +8,6 @@ module-item-order-groupings = [ ["functions", ["fn"]], ["implementations", ["impl"]], ] -module-items-ordered-within-groupings = "all" -missing-docs-allow-unused = true +allow-unwrap-in-tests = true +allow-panic-in-tests = true