forked from linebender/xilem
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.clippy.toml
More file actions
46 lines (41 loc) · 1.66 KB
/
.clippy.toml
File metadata and controls
46 lines (41 loc) · 1.66 KB
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
# LINEBENDER LINT SET - .clippy.toml - v1
# See https://linebender.org/wiki/canonical-lints/
# The default Clippy value is capped at 8 bytes, which was chosen to improve performance on 32-bit.
# Given that we are building for the future and even low-end mobile phones have 64-bit CPUs,
# it makes sense to optimize for 64-bit and accept the performance hits on 32-bit.
# 16 bytes is the number of bytes that fits into two 64-bit CPU registers.
trivial-copy-size-limit = 16
# END LINEBENDER LINT SET
# Don't warn about these identifiers when using clippy::doc_markdown.
doc-valid-idents = [
"FizzBuzz",
"MathML",
"RustNL",
# TODO: Get this allowed in upstream clippy?
"BiDi",
"VSync",
# For better or for worse, we don't treat pass names as identifiers in our docs.
# TODO: Maybe we should?
"update_xxx",
"update_pointer",
"update_scrolls",
"update_focus",
"update_focusable",
"update_disabled",
"update_anim",
"update_stashed",
"update_widget_tree",
"on_access_event",
"on_text_event",
"on_pointer_event",
# `".."` means the default configuration built-in to Clippy.
"..",
]
# The default clippy value for this is 250, which causes warnings for rather simple types
# like Box<dyn Fn(&mut Env, &T)>, which seems overly strict. The new value of 400 is
# a simple guess. It might be worth lowering this, or using the default, in the future.
type-complexity-threshold = 400
disallowed-types = [
# For Placehero
{ path = "megalodon::mastodon::Mastodon", reason = "In case of future changes, we want to keep all our assumptions about using Mastodon centralised", replacement = "placehero::Mastodon" },
]