Skip to content

Commit b756411

Browse files
authored
Add some clippy lints (#211)
1 parent 2307176 commit b756411

File tree

1 file changed

+32
-10
lines changed

1 file changed

+32
-10
lines changed

Cargo.toml

Lines changed: 32 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ opt-level = 2
5353
# eframe = { path = "../egui/crates/eframe" }
5454

5555

56-
5756
# ----------------------------------------------------------------------------------------
5857
# Lints:
5958

@@ -89,23 +88,27 @@ allow_attributes = "warn"
8988
as_ptr_cast_mut = "warn"
9089
await_holding_lock = "warn"
9190
bool_to_int_with_if = "warn"
91+
branches_sharing_code = "warn"
9292
char_lit_as_u8 = "warn"
9393
checked_conversions = "warn"
9494
clear_with_drain = "warn"
9595
cloned_instead_of_copied = "warn"
9696
dbg_macro = "warn"
9797
debug_assert_with_mut_call = "warn"
98+
default_union_representation = "warn"
9899
derive_partial_eq_without_eq = "warn"
99-
disallowed_macros = "warn" # See clippy.toml
100-
disallowed_methods = "warn" # See clippy.toml
101-
disallowed_names = "warn" # See clippy.toml
102-
disallowed_script_idents = "warn" # See clippy.toml
103-
disallowed_types = "warn" # See clippy.toml
104-
doc_include_without_cfg = "warn"
100+
disallowed_macros = "warn" # See clippy.toml
101+
disallowed_methods = "warn" # See clippy.toml
102+
disallowed_names = "warn" # See clippy.toml
103+
disallowed_script_idents = "warn" # See clippy.toml
104+
disallowed_types = "warn" # See clippy.toml
105+
doc_comment_double_space_linebreaks = "warn"
105106
doc_link_with_quotes = "warn"
106107
doc_markdown = "warn"
108+
elidable_lifetime_names = "warn"
107109
empty_enum = "warn"
108110
empty_enum_variants_with_brackets = "warn"
111+
empty_line_after_outer_attr = "warn"
109112
enum_glob_use = "warn"
110113
equatable_if_let = "warn"
111114
exit = "warn"
@@ -121,9 +124,14 @@ fn_params_excessive_bools = "warn"
121124
fn_to_numeric_cast_any = "warn"
122125
from_iter_instead_of_collect = "warn"
123126
get_unwrap = "warn"
127+
if_let_mutex = "warn"
128+
ignore_without_reason = "warn"
124129
implicit_clone = "warn"
130+
implied_bounds_in_impls = "warn"
125131
imprecise_flops = "warn"
132+
inconsistent_struct_constructor = "warn"
126133
index_refutable_slice = "warn"
134+
indexing_slicing = "warn"
127135
inefficient_to_string = "warn"
128136
infinite_loop = "warn"
129137
into_iter_without_iter = "warn"
@@ -153,19 +161,20 @@ manual_instant_elapsed = "warn"
153161
manual_is_power_of_two = "warn"
154162
manual_is_variant_and = "warn"
155163
manual_let_else = "warn"
164+
manual_midpoint = "warn"
156165
manual_ok_or = "warn"
157166
manual_string_new = "warn"
158167
map_err_ignore = "warn"
159168
map_flatten = "warn"
160169
match_bool = "warn"
161-
match_on_vec_items = "warn"
162170
match_same_arms = "warn"
163171
match_wild_err_arm = "warn"
164172
match_wildcard_for_single_variants = "warn"
165173
mem_forget = "warn"
166174
mismatching_type_param_order = "warn"
167175
missing_assert_message = "warn"
168176
missing_enforced_import_renames = "warn"
177+
missing_errors_doc = "warn"
169178
missing_safety_doc = "warn"
170179
mixed_attributes_style = "warn"
171180
mut_mut = "warn"
@@ -176,12 +185,16 @@ needless_for_each = "warn"
176185
needless_pass_by_ref_mut = "warn"
177186
needless_pass_by_value = "warn"
178187
negative_feature_names = "warn"
188+
non_std_lazy_statics = "warn"
179189
non_zero_suggestions = "warn"
180190
nonstandard_macro_braces = "warn"
181191
option_as_ref_cloned = "warn"
182192
option_option = "warn"
183193
path_buf_push_overwrite = "warn"
184194
pathbuf_init_then_push = "warn"
195+
precedence_bits = "warn"
196+
print_stderr = "warn"
197+
print_stdout = "warn"
185198
ptr_as_ptr = "warn"
186199
ptr_cast_constness = "warn"
187200
pub_underscore_fields = "warn"
@@ -191,13 +204,16 @@ readonly_write_lock = "warn"
191204
redundant_type_annotations = "warn"
192205
ref_as_ptr = "warn"
193206
ref_option_ref = "warn"
207+
ref_patterns = "warn"
194208
rest_pat_in_fully_bound_structs = "warn"
209+
return_and_then = "warn"
195210
same_functions_in_if_condition = "warn"
196211
semicolon_if_nothing_returned = "warn"
197212
set_contains_or_insert = "warn"
198213
should_panic_without_expect = "warn"
199214
single_char_pattern = "warn"
200215
single_match_else = "warn"
216+
single_option_map = "warn"
201217
str_split_at_newline = "warn"
202218
str_to_string = "warn"
203219
string_add = "warn"
@@ -212,15 +228,20 @@ too_long_first_doc_paragraph = "warn"
212228
too_many_lines = "warn"
213229
trailing_empty_array = "warn"
214230
trait_duplication_in_bounds = "warn"
231+
transmute_ptr_to_ptr = "warn"
215232
tuple_array_conversions = "warn"
216233
unchecked_duration_subtraction = "warn"
217234
undocumented_unsafe_blocks = "warn"
218235
unimplemented = "warn"
219236
uninhabited_references = "warn"
220237
uninlined_format_args = "warn"
221238
unnecessary_box_returns = "warn"
239+
unnecessary_debug_formatting = "warn"
222240
unnecessary_literal_bound = "warn"
241+
unnecessary_safety_comment = "warn"
223242
unnecessary_safety_doc = "warn"
243+
unnecessary_self_imports = "warn"
244+
unnecessary_semicolon = "warn"
224245
unnecessary_struct_initialization = "warn"
225246
unnecessary_wraps = "warn"
226247
unnested_or_patterns = "warn"
@@ -230,11 +251,12 @@ unused_self = "warn"
230251
unused_trait_names = "warn"
231252
unwrap_used = "warn"
232253
use_self = "warn"
254+
useless_let_if_seq = "warn"
233255
useless_transmute = "warn"
234256
verbose_file_reads = "warn"
235257
wildcard_dependencies = "warn"
236258
wildcard_imports = "warn"
237259
zero_sized_map_values = "warn"
238260

239-
manual_range_contains = "allow" # this is better on 'allow'
240-
map_unwrap_or = "allow" # this is better on 'allow'
261+
manual_range_contains = "allow" # this is better on 'allow'
262+
map_unwrap_or = "allow" # this is better on 'allow'

0 commit comments

Comments
 (0)