|
2 | 2 | name = "eframe_template" |
3 | 3 | version = "0.1.0" |
4 | 4 | authors = ["Emil Ernerfeldt <emil.ernerfeldt@gmail.com>"] |
5 | | -edition = "2021" |
| 5 | +edition = "2024" |
6 | 6 | include = ["LICENSE-APACHE", "LICENSE-MIT", "**/*.rs", "Cargo.toml"] |
7 | | -rust-version = "1.81" |
| 7 | +rust-version = "1.85" |
8 | 8 |
|
9 | 9 | [package.metadata.docs.rs] |
10 | 10 | all-features = true |
@@ -51,3 +51,190 @@ opt-level = 2 |
51 | 51 | # If you fork https://github.com/emilk/egui you can test with: |
52 | 52 | # egui = { path = "../egui/crates/egui" } |
53 | 53 | # eframe = { path = "../egui/crates/eframe" } |
| 54 | + |
| 55 | + |
| 56 | + |
| 57 | +# ---------------------------------------------------------------------------------------- |
| 58 | +# Lints: |
| 59 | + |
| 60 | +[lints] |
| 61 | +workspace = true |
| 62 | + |
| 63 | +[workspace.lints.rust] |
| 64 | +unsafe_code = "deny" |
| 65 | + |
| 66 | +elided_lifetimes_in_paths = "warn" |
| 67 | +future_incompatible = { level = "warn", priority = -1 } |
| 68 | +nonstandard_style = { level = "warn", priority = -1 } |
| 69 | +rust_2018_idioms = { level = "warn", priority = -1 } |
| 70 | +rust_2021_prelude_collisions = "warn" |
| 71 | +semicolon_in_expressions_from_macros = "warn" |
| 72 | +trivial_numeric_casts = "warn" |
| 73 | +unsafe_op_in_unsafe_fn = "warn" # `unsafe_op_in_unsafe_fn` may become the default in future Rust versions: https://github.com/rust-lang/rust/issues/71668 |
| 74 | +unused_extern_crates = "warn" |
| 75 | +unused_import_braces = "warn" |
| 76 | +unused_lifetimes = "warn" |
| 77 | + |
| 78 | +trivial_casts = "allow" |
| 79 | +unused_qualifications = "allow" |
| 80 | + |
| 81 | + |
| 82 | +[workspace.lints.rustdoc] |
| 83 | +all = "warn" |
| 84 | +missing_crate_level_docs = "warn" |
| 85 | + |
| 86 | + |
| 87 | +[workspace.lints.clippy] |
| 88 | +allow_attributes = "warn" |
| 89 | +as_ptr_cast_mut = "warn" |
| 90 | +await_holding_lock = "warn" |
| 91 | +bool_to_int_with_if = "warn" |
| 92 | +char_lit_as_u8 = "warn" |
| 93 | +checked_conversions = "warn" |
| 94 | +clear_with_drain = "warn" |
| 95 | +cloned_instead_of_copied = "warn" |
| 96 | +dbg_macro = "warn" |
| 97 | +debug_assert_with_mut_call = "warn" |
| 98 | +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" |
| 105 | +doc_link_with_quotes = "warn" |
| 106 | +doc_markdown = "warn" |
| 107 | +empty_enum = "warn" |
| 108 | +empty_enum_variants_with_brackets = "warn" |
| 109 | +enum_glob_use = "warn" |
| 110 | +equatable_if_let = "warn" |
| 111 | +exit = "warn" |
| 112 | +expl_impl_clone_on_copy = "warn" |
| 113 | +explicit_deref_methods = "warn" |
| 114 | +explicit_into_iter_loop = "warn" |
| 115 | +explicit_iter_loop = "warn" |
| 116 | +fallible_impl_from = "warn" |
| 117 | +filter_map_next = "warn" |
| 118 | +flat_map_option = "warn" |
| 119 | +float_cmp_const = "warn" |
| 120 | +fn_params_excessive_bools = "warn" |
| 121 | +fn_to_numeric_cast_any = "warn" |
| 122 | +from_iter_instead_of_collect = "warn" |
| 123 | +get_unwrap = "warn" |
| 124 | +implicit_clone = "warn" |
| 125 | +imprecise_flops = "warn" |
| 126 | +index_refutable_slice = "warn" |
| 127 | +inefficient_to_string = "warn" |
| 128 | +infinite_loop = "warn" |
| 129 | +into_iter_without_iter = "warn" |
| 130 | +invalid_upcast_comparisons = "warn" |
| 131 | +iter_filter_is_ok = "warn" |
| 132 | +iter_filter_is_some = "warn" |
| 133 | +iter_not_returning_iterator = "warn" |
| 134 | +iter_on_empty_collections = "warn" |
| 135 | +iter_on_single_items = "warn" |
| 136 | +iter_over_hash_type = "warn" |
| 137 | +iter_without_into_iter = "warn" |
| 138 | +large_digit_groups = "warn" |
| 139 | +large_include_file = "warn" |
| 140 | +large_stack_arrays = "warn" |
| 141 | +large_stack_frames = "warn" |
| 142 | +large_types_passed_by_value = "warn" |
| 143 | +let_underscore_must_use = "warn" |
| 144 | +let_underscore_untyped = "warn" |
| 145 | +let_unit_value = "warn" |
| 146 | +linkedlist = "warn" |
| 147 | +literal_string_with_formatting_args = "warn" |
| 148 | +lossy_float_literal = "warn" |
| 149 | +macro_use_imports = "warn" |
| 150 | +manual_assert = "warn" |
| 151 | +manual_clamp = "warn" |
| 152 | +manual_instant_elapsed = "warn" |
| 153 | +manual_is_power_of_two = "warn" |
| 154 | +manual_is_variant_and = "warn" |
| 155 | +manual_let_else = "warn" |
| 156 | +manual_ok_or = "warn" |
| 157 | +manual_string_new = "warn" |
| 158 | +map_err_ignore = "warn" |
| 159 | +map_flatten = "warn" |
| 160 | +match_bool = "warn" |
| 161 | +match_on_vec_items = "warn" |
| 162 | +match_same_arms = "warn" |
| 163 | +match_wild_err_arm = "warn" |
| 164 | +match_wildcard_for_single_variants = "warn" |
| 165 | +mem_forget = "warn" |
| 166 | +mismatching_type_param_order = "warn" |
| 167 | +missing_assert_message = "warn" |
| 168 | +missing_enforced_import_renames = "warn" |
| 169 | +missing_safety_doc = "warn" |
| 170 | +mixed_attributes_style = "warn" |
| 171 | +mut_mut = "warn" |
| 172 | +mutex_integer = "warn" |
| 173 | +needless_borrow = "warn" |
| 174 | +needless_continue = "warn" |
| 175 | +needless_for_each = "warn" |
| 176 | +needless_pass_by_ref_mut = "warn" |
| 177 | +needless_pass_by_value = "warn" |
| 178 | +negative_feature_names = "warn" |
| 179 | +non_zero_suggestions = "warn" |
| 180 | +nonstandard_macro_braces = "warn" |
| 181 | +option_as_ref_cloned = "warn" |
| 182 | +option_option = "warn" |
| 183 | +path_buf_push_overwrite = "warn" |
| 184 | +pathbuf_init_then_push = "warn" |
| 185 | +ptr_as_ptr = "warn" |
| 186 | +ptr_cast_constness = "warn" |
| 187 | +pub_underscore_fields = "warn" |
| 188 | +pub_without_shorthand = "warn" |
| 189 | +rc_mutex = "warn" |
| 190 | +readonly_write_lock = "warn" |
| 191 | +redundant_type_annotations = "warn" |
| 192 | +ref_as_ptr = "warn" |
| 193 | +ref_option_ref = "warn" |
| 194 | +rest_pat_in_fully_bound_structs = "warn" |
| 195 | +same_functions_in_if_condition = "warn" |
| 196 | +semicolon_if_nothing_returned = "warn" |
| 197 | +set_contains_or_insert = "warn" |
| 198 | +should_panic_without_expect = "warn" |
| 199 | +single_char_pattern = "warn" |
| 200 | +single_match_else = "warn" |
| 201 | +str_split_at_newline = "warn" |
| 202 | +str_to_string = "warn" |
| 203 | +string_add = "warn" |
| 204 | +string_add_assign = "warn" |
| 205 | +string_lit_as_bytes = "warn" |
| 206 | +string_lit_chars_any = "warn" |
| 207 | +string_to_string = "warn" |
| 208 | +suspicious_command_arg_space = "warn" |
| 209 | +suspicious_xor_used_as_pow = "warn" |
| 210 | +todo = "warn" |
| 211 | +too_long_first_doc_paragraph = "warn" |
| 212 | +too_many_lines = "warn" |
| 213 | +trailing_empty_array = "warn" |
| 214 | +trait_duplication_in_bounds = "warn" |
| 215 | +tuple_array_conversions = "warn" |
| 216 | +unchecked_duration_subtraction = "warn" |
| 217 | +undocumented_unsafe_blocks = "warn" |
| 218 | +unimplemented = "warn" |
| 219 | +uninhabited_references = "warn" |
| 220 | +uninlined_format_args = "warn" |
| 221 | +unnecessary_box_returns = "warn" |
| 222 | +unnecessary_literal_bound = "warn" |
| 223 | +unnecessary_safety_doc = "warn" |
| 224 | +unnecessary_struct_initialization = "warn" |
| 225 | +unnecessary_wraps = "warn" |
| 226 | +unnested_or_patterns = "warn" |
| 227 | +unused_peekable = "warn" |
| 228 | +unused_rounding = "warn" |
| 229 | +unused_self = "warn" |
| 230 | +unused_trait_names = "warn" |
| 231 | +unwrap_used = "warn" |
| 232 | +use_self = "warn" |
| 233 | +useless_transmute = "warn" |
| 234 | +verbose_file_reads = "warn" |
| 235 | +wildcard_dependencies = "warn" |
| 236 | +wildcard_imports = "warn" |
| 237 | +zero_sized_map_values = "warn" |
| 238 | + |
| 239 | +manual_range_contains = "allow" # this is better on 'allow' |
| 240 | +map_unwrap_or = "allow" # this is better on 'allow' |
0 commit comments