forked from Steel-Foundation/SteelMC
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathclippy.toml
More file actions
42 lines (40 loc) · 2.43 KB
/
clippy.toml
File metadata and controls
42 lines (40 loc) · 2.43 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
allowed-duplicate-crates = [
"digest",
"getrandom",
"windows-sys",
"windows-targets",
"windows_aarch64_gnullvm",
"windows_aarch64_msvc",
"windows_i686_gnu",
"windows_i686_gnullvm",
"windows_i686_msvc",
"windows_x86_64_gnu",
"windows_x86_64_gnullvm",
"windows_x86_64_msvc",
"crypto-common",
]
disallowed-types = [
# Use FxHashMap and FxHashSet instead of HashMap and HashSet.
{ path = "std::collections::HashMap", reason = "Use rustc_hash::FxHashMap instead of HashMap." },
{ path = "std::collections::HashSet", reason = "Use rustc_hash::FxHashSet instead of HashSet." },
# Use SyncMutex and SyncRwLock instead of std::sync::Mutex and std::sync::RwLock.
{ path = "std::sync::Mutex", reason = "Use steel_utils::locks::SyncMutex instead of std::sync::Mutex." },
{ path = "std::sync::RwLock", reason = "Use steel_utils::locks::SyncRwLock instead of std::sync::RwLock." },
# Use SyncMutex and SyncRwLock instead of parking_lot::Mutex and parking_lot::RwLock.
{ path = "parking_lot::Mutex", reason = "Use steel_utils::locks::SyncMutex instead of parking_lot::Mutex." },
{ path = "parking_lot::RwLock", reason = "Use steel_utils::locks::SyncRwLock instead of parking_lot::RwLock." },
# Use AsyncMutex and AsyncRwLock instead of tokio::sync::Mutex and tokio::sync::RwLock.
{ path = "tokio::sync::Mutex", reason = "Use steel_utils::locks::AsyncMutex instead of tokio::sync::Mutex." },
{ path = "tokio::sync::RwLock", reason = "Use steel_utils::locks::AsyncRwLock instead of tokio::sync::RwLock." },
# Use FxSmallMap instead of SmallMap
{ path = "small_map::SmallMap", reason = "Use small_map::FxSmallMap instead of small_map::SmallMap." },
]
disallowed-methods = [
# Prevent people from taking ownership of the Arc inside the ArcSwap Guard
{ path = "arc_swap::Guard::into_inner", reason = "Holding a strong reference to a Chunk leads to stale data. Use the Guard directly for transient access." },
# const_translate should only be use in generated code
{ path = "text_components::translation::TranslatedMessage::new", reason = "New TranslatedMessages should only be use in generated code. Use steel_utils::translations::GeneratedTranslation::msg().into() instead." },
# Only use ptr::eq where required, for blocks use the PartialEq compare
{ path = "std::ptr::eq", reason = "For blocks use the PartialEq compare instead." },
]
avoid-breaking-exported-api = false