-
Notifications
You must be signed in to change notification settings - Fork 21
Expand file tree
/
Copy path.non-vite.clippy.toml
More file actions
26 lines (23 loc) · 1.88 KB
/
.non-vite.clippy.toml
File metadata and controls
26 lines (23 loc) · 1.88 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
# Clippy configuration for non-vite crates (fspy_*, subprocess_test, pty_terminal, etc.)
# that don't depend on vite_str/vite_path.
#
# This is a subset of the root .clippy.toml, with rules recommending vite_str/vite_path
# alternatives removed. Generic rules (cow_utils, rustc-hash) still apply.
#
# To use: symlink as `.clippy.toml` in the crate's directory:
# ln -s ../../.non-vite.clippy.toml .clippy.toml
avoid-breaking-exported-api = false
disallowed-methods = [
{ path = "str::to_ascii_lowercase", reason = "To avoid memory allocation, use `cow_utils::CowUtils::cow_to_ascii_lowercase` instead." },
{ path = "str::to_ascii_uppercase", reason = "To avoid memory allocation, use `cow_utils::CowUtils::cow_to_ascii_uppercase` instead." },
{ path = "str::to_lowercase", reason = "To avoid memory allocation, use `cow_utils::CowUtils::cow_to_lowercase` instead." },
{ path = "str::to_uppercase", reason = "To avoid memory allocation, use `cow_utils::CowUtils::cow_to_uppercase` instead." },
{ path = "str::replace", reason = "To avoid memory allocation, use `cow_utils::CowUtils::cow_replace` instead." },
{ path = "str::replacen", reason = "To avoid memory allocation, use `cow_utils::CowUtils::cow_replacen` instead." },
{ path = "std::thread::sleep", reason = "Use proper synchronization (channels, condvars, etc.) instead of sleeping. Sleep is only acceptable for intentional user-facing delays (e.g. animations, debouncing)." },
{ path = "tokio::time::sleep", reason = "Use proper synchronization (channels, signals, etc.) instead of sleeping. Sleep is only acceptable for intentional user-facing delays (e.g. animations, debouncing)." },
]
disallowed-types = [
{ path = "std::collections::HashMap", reason = "Use `rustc_hash::FxHashMap` instead, which is typically faster." },
{ path = "std::collections::HashSet", reason = "Use `rustc_hash::FxHashSet` instead, which is typically faster." },
]