-
-
Notifications
You must be signed in to change notification settings - Fork 44
/
Copy pathCargo.toml
139 lines (112 loc) · 4.75 KB
/
Cargo.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
[workspace]
members = [
"linker-diff",
"linker-layout",
"linker-trace",
"linker-utils",
"wild",
"libwild",
]
resolver = "2"
[workspace.package]
repository = "https://github.com/davidlattimore/wild"
license = "MIT OR Apache-2.0"
version = "0.4.0"
readme = "README.md"
rust-version = "1.85"
edition = "2024"
[profile.opt-debug]
inherits = "release"
debug = true
# The profile that 'dist' will build with
[profile.dist]
inherits = "release"
lto = "thin"
# In CI, we disable debug info. This gives us faster builds. It also reduces the size of the target
# directory, allowing us to fit more into cache. The only resulting loss is line numbers in
# backtraces. If we really wanted those, we could set `debug = "line-tables-only"`, however it seems
# unlikely that we'd need line numbers in backtraces all that often, so we don't for now.
[profile.ci]
inherits = "dev"
debug = 0
[workspace.lints.clippy]
# It's not always desirable to use if-let instead of a match, especially if you might later end up
# adding more branches to the match.
single_match = "allow"
# Sure, less arguments is good, but it's a trade-off. Sometimes you have a complex function that
# you'd like to split by extracting part of it out into a new function. That new function might
# have lots of arguments. It might be possible to group some of those arguments together into some
# new struct, but not always. Given the choice between a function that's too large and does too
# much vs a function that has too many arguments, it's sometimes best to pick the latter.
# Especially since that function is generally only ever called from one place and the arguments all
# have distinct types.
too_many_arguments = "allow"
# I might add additional fields later, so why make me remove ..Default::default()?
needless_update = "allow"
# Depending on circumstances, it's often clearer to use an if-else.
bool_to_int_with_if = "allow"
# Possibly at some point we should look into these, but we have quite a lot.
cast_possible_truncation = "allow"
# Might revisit this later.
cast_possible_wrap = "allow"
# Often we do this in conjunction with a call to wrapping_add, so it's fine.
cast_sign_loss = "allow"
# I like initialising things as `Default::default`, since if I change the type of the field, often I
# don't need to change the initialisation.
default_trait_access = "allow"
# If we were writing a library that we expected to get a lot of use and which needed high quality
# docs, this might be important.
doc_markdown = "allow"
# This doesn't seem like a problem to me.
explicit_deref_methods = "allow"
# This just doesn't seem all that important.
ignored_unit_patterns = "allow"
# Doesn't seem like a big issue to me.
items_after_statements = "allow"
# We sometimes have iterators that don't implement the Iterator trait, but instead just have an
# inherent implementation of `next`. This makes navigating the code easier, since all uses of that
# `next` method can easily be found.
iter_not_returning_iterator = "allow"
# Indexing into a vec may panic. That's true, and if it does, that's a bug. The fact that we're
# matching on the element of the vec is irrelevant.
match_on_vec_items = "allow"
# Sometimes you have a comment on one arm that doesn't apply to the other arms. Clippy isn't smart
# enough to see that the comment is what is different.
match_same_arms = "allow"
# Documenting all functions that return results seems like a lot of work and there are probably
# other docs that would be higher value to write instead.
missing_errors_doc = "allow"
# Should probably fix this, but not now.
mut_mut = "allow"
# Have observed some false positives with this. Also not 100% sure that it's always more readable.
redundant_closure_for_method_calls = "allow"
# The proposed alternative of using an enum doesn't always apply.
struct_excessive_bools = "allow"
# Could revisit this in future. For now, it doesn't seem at all important.
struct_field_names = "allow"
# It'd probably be good to fix some of these. Although for some it may not necessarily help
# readability.
too_many_lines = "allow"
# Some of our tests do this and there doesn't seem to be much value in changing them.
unreadable_literal = "allow"
trivially_copy_pass_by_ref = "warn"
uninlined_format_args = "warn"
unnecessary_wraps = "warn"
unused_self = "warn"
wildcard_imports = "warn"
manual_assert = "warn"
explicit_iter_loop = "warn"
if_not_else = "warn"
implicit_clone = "warn"
inconsistent_struct_constructor = "warn"
map_unwrap_or = "warn"
match_wildcard_for_single_variants = "warn"
needless_pass_by_value = "warn"
redundant_else = "warn"
semicolon_if_nothing_returned = "warn"
range_plus_one = "warn"
must_use_candidate = "warn"
case_sensitive_file_extension_comparisons = "warn"
cloned_instead_of_copied = "warn"
cast_lossless = "warn"
needless_pass_by_ref_mut = "warn"