Skip to content

Commit 7bf2d7a

Browse files
committed
Remove unused lints
1 parent c75b6c4 commit 7bf2d7a

File tree

3 files changed

+4
-152
lines changed

3 files changed

+4
-152
lines changed

.clippy.toml

Lines changed: 0 additions & 5 deletions
This file was deleted.

.rustfmt.toml

Lines changed: 1 addition & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,2 @@
1-
# injects `rustfmt` formatter into code blocks in doc comments
2-
format_code_in_doc_comments = true
3-
# when blocky items are the last argument to a function, they can overflow
4-
overflow_delimited_expr = true
5-
# `Foo { x: x }` => `Foo { x }`
6-
use_field_init_shorthand = true
7-
# `let (a, _, _) = ...` => `let (a, ..) => ...`
8-
condense_wildcard_suffixes = true
9-
# breaks up long string literals over several lines
10-
format_strings = true
11-
# This is the most merge-conflict-friendly option to organize imports
12-
# each `use` imports a single item
13-
imports_granularity = "Item"
14-
# converts `/* */` to `//`
15-
normalize_comments = true
16-
# converts `#[doc]` to `///`
17-
normalize_doc_attributes = true
18-
# use `0xdeadbeef` and not `0xDEADBEEF`
19-
hex_literal_case = "Lower"
20-
# Force multiline closure and match arm bodies to be wrapped in a block
21-
#
22-
# This makes it MUCH easier to then add more statements in the closure/match arm
231
force_multiline_blocks = true
24-
# Comments longer than 80 characters are wrapped to the next line
25-
wrap_comments = true
26-
# always format struct, and enum variant with named fields
27-
# into multiple lines - makes refactoring easier
28-
struct_variant_width = 0
29-
# like above, but with literals
30-
struct_lit_width = 0
2+
imports_granularity = "Item"

Cargo.toml

Lines changed: 3 additions & 118 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ license = "MIT OR Apache-2.0"
99

1010
# Our MSRV. We use nightly toolchain for better dev experience, but
1111
# this software must build with at least this version.
12-
#
12+
#
1313
# More info in the comment in `rust-toolchain.toml`
1414
rust-version = "1.88"
1515

@@ -65,122 +65,7 @@ rand = "0.9.2"
6565
[profile.dist]
6666
inherits = "release"
6767
codegen-units = 1
68-
lto = true
68+
lto = "fat"
6969

7070
[workspace.lints.rust]
71-
# do not import if its already in scope
72-
# e.g. `use std::option::Option::None`
73-
redundant_imports = "warn"
74-
# Documentation for all public items
75-
missing_docs = "warn"
76-
# `foo::bar::baz` => `bar::baz` if `bar` is in scope
77-
unused_qualifications = "warn"
78-
# detects rules of macros that weren't used
79-
unused_macro_rules = "warn"
80-
# lints against e.g. undefined meta variables
81-
meta_variable_misuse = "warn"
82-
83-
[workspace.lints.clippy]
84-
pedantic = { priority = -1, level = "warn" }
85-
86-
# --- allowed lints
87-
#
88-
# `$a * $b + $c` is slower and less precise than `$a.mul_add($b, $c)`
89-
# but it is more readable, the gain in speed / precision
90-
# will be negligible in most situations
91-
suboptimal_flops = "allow"
92-
# arbitrary limit imposes unnecessary
93-
# restriction and can make code harder to follow
94-
too_many_lines = "allow"
95-
# if we need it const, make it const.
96-
# no need to make everything that can be const, const
97-
missing_const_for_fn = "allow"
98-
# Too verbose.
99-
missing_errors_doc = "allow"
100-
# ---
101-
102-
# --- more consistent ways of writing code
103-
#
104-
# `if $a { Some($b) } else { None }` => `$a.then(|| $b)`
105-
if_then_some_else_none = "warn"
106-
# `foo.rs` => `foo/mod.rs`
107-
self_named_module_files = "warn"
108-
# omit `test_` prefix in tests: `fn test_foo` => `fn foo`
109-
redundant_test_prefix = "warn"
110-
# `123832i64` => `123832_i64`
111-
unseparated_literal_suffix = "warn"
112-
# `Foo { a: _, b: 0, .. }` => `Foo { b: 0, .. }`
113-
# do not bind unused by `_` when pattern matching, bind by `..` instead
114-
unneeded_field_pattern = "warn"
115-
# `Err(x)?` => `return Err(x)`
116-
try_err = "warn"
117-
# `#[test] fn` must be in `#[cfg(test)]`
118-
tests_outside_test_module = "warn"
119-
# functions ending in `.and_then` could be better expressed as `?`
120-
return_and_then = "warn"
121-
# `match (A { a }) { A { a, .. } => () }` => `match (A { a: 5 }) { A { a } => () }`
122-
rest_pat_in_fully_bound_structs = "warn"
123-
# do not use differing names from the trait itself when implementing its method
124-
renamed_function_params = "warn"
125-
# `0x2345 & 0xF000 >> 12` => `0x2345 & (0xF000 >> 12)`
126-
precedence_bits = "warn"
127-
# omitting type annotations make code easier to modify
128-
redundant_type_annotations = "warn"
129-
# `assert!(r.is_ok())` => `r.unwrap()`
130-
assertions_on_result_states = "warn"
131-
# `fs::read_to_string` requires much less steps than `File::read_to_string`
132-
verbose_file_reads = "warn"
133-
# `use std::io::{self}` => `use std::io`
134-
unnecessary_self_imports = "warn"
135-
# do not lose type information about NonZero numbers
136-
non_zero_suggestions = "warn"
137-
# exit obscures flow of the program
138-
exit = "warn"
139-
# no need for a `SAFETY:` comment on safe code
140-
unnecessary_safety_comment = "warn"
141-
# each `unsafe` block must contain only 1 unsafe operation
142-
multiple_unsafe_ops_per_block = "warn"
143-
# ---
144-
145-
# --- explain more things
146-
#
147-
# `#[allow]` => `#[expect]`
148-
allow_attributes = "warn"
149-
# `#[allow]` => `#[allow, reason = "why"]`
150-
allow_attributes_without_reason = "warn"
151-
# `unsafe` blocks need a `SAFETY:` comment
152-
undocumented_unsafe_blocks = "warn"
153-
# `.unwrap()` => `.expect("why")`
154-
unwrap_used = "warn"
155-
# `arr[4]` => `arr.get(4).expect("why")`
156-
indexing_slicing = "warn"
157-
# `assert!(...)` => `assert!(..., "why")`
158-
missing_assert_message = "warn"
159-
# documentation for everything
160-
missing_docs_in_private_items = "warn"
161-
# `path_buf.push("foo")` => `... = PathBuf::new().join("foo")`
162-
pathbuf_init_then_push = "warn"
163-
# explicitly mark return type as `!` for infinite loop fns
164-
infinite_loop = "warn"
165-
# ---
166-
167-
# --- catch debug remnants
168-
#
169-
dbg_macro = "warn"
170-
todo = "warn"
171-
use_debug = "warn"
172-
unimplemented = "warn"
173-
# must explicitly `#[allow]` functions to print to stdout
174-
print_stdout = "warn"
175-
# must explicitly `#[allow]` functions to print to stderr
176-
print_stderr = "warn"
177-
# ---
178-
179-
# --- prevent bugs
180-
# if function and trait provide method of same name, it is confusing
181-
same_name_method = "warn"
182-
# `create_dir(...)` => `create_dir_all(...)`
183-
# usually, failing when dir already exists is
184-
# not what we want
185-
create_dir = "warn"
186-
# ---
71+
unused_qualifications = "warn"

0 commit comments

Comments
 (0)