Skip to content

Commit 2544d28

Browse files
authored
style: make clippy more strict (#743)
1 parent 135ae03 commit 2544d28

File tree

1 file changed

+150
-2
lines changed

1 file changed

+150
-2
lines changed

Cargo.toml

Lines changed: 150 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,153 @@ default = ["big-math"]
2121
big-math = ["dep:num-bigint", "dep:num-traits"]
2222

2323
[lints.clippy]
24-
uninlined_format_args = "warn"
25-
map_unwrap_or = "warn"
24+
pedantic = "warn"
25+
restriction = "warn"
26+
nursery = "warn"
27+
cargo = "warn"
28+
# pedantic-lints:
29+
bool_to_int_with_if = { level = "allow", priority = 1 }
30+
cast_lossless = { level = "allow", priority = 1 }
31+
cast_possible_truncation = { level = "allow", priority = 1 }
32+
cast_possible_wrap = { level = "allow", priority = 1 }
33+
cast_precision_loss = { level = "allow", priority = 1 }
34+
cast_sign_loss = { level = "allow", priority = 1 }
35+
cloned_instead_of_copied = { level = "allow", priority = 1 }
36+
default_trait_access = { level = "allow", priority = 1 }
37+
doc_markdown = { level = "allow", priority = 1 }
38+
enum_glob_use = { level = "allow", priority = 1 }
39+
explicit_deref_methods = { level = "allow", priority = 1 }
40+
explicit_into_iter_loop = { level = "allow", priority = 1 }
41+
explicit_iter_loop = { level = "allow", priority = 1 }
42+
float_cmp = { level = "allow", priority = 1 }
43+
from_iter_instead_of_collect = { level = "allow", priority = 1 }
44+
if_not_else = { level = "allow", priority = 1 }
45+
implicit_clone = { level = "allow", priority = 1 }
46+
implicit_hasher = { level = "allow", priority = 1 }
47+
inefficient_to_string = { level = "allow", priority = 1 }
48+
items_after_statements = { level = "allow", priority = 1 }
49+
iter_without_into_iter = { level = "allow", priority = 1 }
50+
linkedlist = { level = "allow", priority = 1 }
51+
manual_assert = { level = "allow", priority = 1 }
52+
manual_let_else = { level = "allow", priority = 1 }
53+
manual_string_new = { level = "allow", priority = 1 }
54+
many_single_char_names = { level = "allow", priority = 1 }
55+
match_bool = { level = "allow", priority = 1 }
56+
match_on_vec_items = { level = "allow", priority = 1 }
57+
match_same_arms = { level = "allow", priority = 1 }
58+
match_wildcard_for_single_variants = { level = "allow", priority = 1 }
59+
missing_errors_doc = { level = "allow", priority = 1 }
60+
missing_fields_in_debug = { level = "allow", priority = 1 }
61+
missing_panics_doc = { level = "allow", priority = 1 }
62+
module_name_repetitions = { level = "allow", priority = 1 }
63+
must_use_candidate = { level = "allow", priority = 1 }
64+
needless_for_each = { level = "allow", priority = 1 }
65+
needless_pass_by_value = { level = "allow", priority = 1 }
66+
no_effect_underscore_binding = { level = "allow", priority = 1 }
67+
range_plus_one = { level = "allow", priority = 1 }
68+
redundant_closure_for_method_calls = { level = "allow", priority = 1 }
69+
redundant_else = { level = "allow", priority = 1 }
70+
return_self_not_must_use = { level = "allow", priority = 1 }
71+
semicolon_if_nothing_returned = { level = "allow", priority = 1 }
72+
should_panic_without_expect = { level = "allow", priority = 1 }
73+
similar_names = { level = "allow", priority = 1 }
74+
single_match_else = { level = "allow", priority = 1 }
75+
stable_sort_primitive = { level = "allow", priority = 1 }
76+
too_many_lines = { level = "allow", priority = 1 }
77+
trivially_copy_pass_by_ref = { level = "allow", priority = 1 }
78+
unnecessary_box_returns = { level = "allow", priority = 1 }
79+
unnecessary_join = { level = "allow", priority = 1 }
80+
unnecessary_wraps = { level = "allow", priority = 1 }
81+
unnested_or_patterns = { level = "allow", priority = 1 }
82+
unreadable_literal = { level = "allow", priority = 1 }
83+
unused_self = { level = "allow", priority = 1 }
84+
used_underscore_binding = { level = "allow", priority = 1 }
85+
# restriction-lints:
86+
absolute_paths = { level = "allow", priority = 1 }
87+
arithmetic_side_effects = { level = "allow", priority = 1 }
88+
as_conversions = { level = "allow", priority = 1 }
89+
assertions_on_result_states = { level = "allow", priority = 1 }
90+
blanket_clippy_restriction_lints = { level = "allow", priority = 1 }
91+
clone_on_ref_ptr = { level = "allow", priority = 1 }
92+
dbg_macro = { level = "allow", priority = 1 }
93+
decimal_literal_representation = { level = "allow", priority = 1 }
94+
default_numeric_fallback = { level = "allow", priority = 1 }
95+
deref_by_slicing = { level = "allow", priority = 1 }
96+
else_if_without_else = { level = "allow", priority = 1 }
97+
exhaustive_enums = { level = "allow", priority = 1 }
98+
exhaustive_structs = { level = "allow", priority = 1 }
99+
expect_used = { level = "allow", priority = 1 }
100+
float_arithmetic = { level = "allow", priority = 1 }
101+
float_cmp_const = { level = "allow", priority = 1 }
102+
get_unwrap = { level = "allow", priority = 1 }
103+
if_then_some_else_none = { level = "allow", priority = 1 }
104+
impl_trait_in_params = { level = "allow", priority = 1 }
105+
implicit_return = { level = "allow", priority = 1 }
106+
indexing_slicing = { level = "allow", priority = 1 }
107+
integer_division = { level = "allow", priority = 1 }
108+
iter_over_hash_type = { level = "allow", priority = 1 }
109+
little_endian_bytes = { level = "allow", priority = 1 }
110+
map_err_ignore = { level = "allow", priority = 1 }
111+
min_ident_chars = { level = "allow", priority = 1 }
112+
missing_assert_message = { level = "allow", priority = 1 }
113+
missing_asserts_for_indexing = { level = "allow", priority = 1 }
114+
missing_docs_in_private_items = { level = "allow", priority = 1 }
115+
missing_inline_in_public_items = { level = "allow", priority = 1 }
116+
missing_trait_methods = { level = "allow", priority = 1 }
117+
mod_module_files = { level = "allow", priority = 1 }
118+
modulo_arithmetic = { level = "allow", priority = 1 }
119+
multiple_unsafe_ops_per_block = { level = "allow", priority = 1 }
120+
non_ascii_literal = { level = "allow", priority = 1 }
121+
panic = { level = "allow", priority = 1 }
122+
partial_pub_fields = { level = "allow", priority = 1 }
123+
pattern_type_mismatch = { level = "allow", priority = 1 }
124+
print_stderr = { level = "allow", priority = 1 }
125+
print_stdout = { level = "allow", priority = 1 }
126+
pub_use = { level = "allow", priority = 1 }
127+
pub_with_shorthand = { level = "allow", priority = 1 }
128+
question_mark_used = { level = "allow", priority = 1 }
129+
redundant_type_annotations = { level = "allow", priority = 1 }
130+
same_name_method = { level = "allow", priority = 1 }
131+
semicolon_outside_block = { level = "allow", priority = 1 }
132+
separated_literal_suffix = { level = "allow", priority = 1 }
133+
shadow_reuse = { level = "allow", priority = 1 }
134+
shadow_same = { level = "allow", priority = 1 }
135+
shadow_unrelated = { level = "allow", priority = 1 }
136+
single_call_fn = { level = "allow", priority = 1 }
137+
single_char_lifetime_names = { level = "allow", priority = 1 }
138+
std_instead_of_alloc = { level = "allow", priority = 1 }
139+
std_instead_of_core = { level = "allow", priority = 1 }
140+
str_to_string = { level = "allow", priority = 1 }
141+
string_add = { level = "allow", priority = 1 }
142+
string_slice = { level = "allow", priority = 1 }
143+
string_to_string = { level = "allow", priority = 1 }
144+
undocumented_unsafe_blocks = { level = "allow", priority = 1 }
145+
unnecessary_safety_comment = { level = "allow", priority = 1 }
146+
unneeded_field_pattern = { level = "allow", priority = 1 }
147+
unreachable = { level = "allow", priority = 1 }
148+
unseparated_literal_suffix = { level = "allow", priority = 1 }
149+
unwrap_in_result = { level = "allow", priority = 1 }
150+
unwrap_used = { level = "allow", priority = 1 }
151+
use_debug = { level = "allow", priority = 1 }
152+
wildcard_enum_match_arm = { level = "allow", priority = 1 }
153+
# nursery-lints:
154+
branches_sharing_code = { level = "allow", priority = 1 }
155+
cognitive_complexity = { level = "allow", priority = 1 }
156+
derive_partial_eq_without_eq = { level = "allow", priority = 1 }
157+
empty_line_after_doc_comments = { level = "allow", priority = 1 }
158+
fallible_impl_from = { level = "allow", priority = 1 }
159+
imprecise_flops = { level = "allow", priority = 1 }
160+
iter_on_single_items = { level = "allow", priority = 1 }
161+
missing_const_for_fn = { level = "allow", priority = 1 }
162+
needless_collect = { level = "allow", priority = 1 }
163+
needless_pass_by_ref_mut = { level = "allow", priority = 1 }
164+
nonstandard_macro_braces = { level = "allow", priority = 1 }
165+
option_if_let_else = { level = "allow", priority = 1 }
166+
redundant_clone = { level = "allow", priority = 1 }
167+
redundant_pub_crate = { level = "allow", priority = 1 }
168+
suboptimal_flops = { level = "allow", priority = 1 }
169+
suspicious_operation_groupings = { level = "allow", priority = 1 }
170+
use_self = { level = "allow", priority = 1 }
171+
useless_let_if_seq = { level = "allow", priority = 1 }
172+
# cargo-lints:
173+
cargo_common_metadata = { level = "allow", priority = 1 }

0 commit comments

Comments
 (0)