Skip to content

Commit 048703b

Browse files
committed
Ban Result::ok
Signed-off-by: Nicholas Gates <[email protected]>
1 parent c6e025a commit 048703b

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

clippy.toml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,12 @@ allow-unwrap-in-tests = true
44
allow-panic-in-tests = true
55
single-char-binding-names-threshold = 2
66
disallowed-types = [
7-
{ path = "std::collections::HashMap", reason = "Use the HashMap in vortex_utils::aliases for better performance" },
8-
{ path = "std::collections::HashSet", reason = "Use the HashSet in vortex_utils::aliases for better performance" },
9-
{ path = "std::sync::Mutex", reason = "Prefer using parking_lot Mutex for improved ergonomics and performance" },
10-
{ path = "std::sync::RwLock", reason = "Prefer using parking_lot RwLock for improved ergonomics and performance" }]
7+
{ path = "std::collections::HashMap", reason = "Use the HashMap in vortex_utils::aliases for better performance" },
8+
{ path = "std::collections::HashSet", reason = "Use the HashSet in vortex_utils::aliases for better performance" },
9+
{ path = "std::sync::Mutex", reason = "Prefer using parking_lot Mutex for improved ergonomics and performance" },
10+
{ path = "std::sync::RwLock", reason = "Prefer using parking_lot RwLock for improved ergonomics and performance" }]
1111

1212
disallowed-methods = [
13-
{ path = "itertools::Itertools::counts", reason = "It uses the default hasher which is slow for primitives. Just inline the loop for better performance.", allow-invalid = true }
13+
{ path = "itertools::Itertools::counts", reason = "It uses the default hasher which is slow for primitives. Just inline the loop for better performance.", allow-invalid = true },
14+
{ path = "std::result::Result::ok", reason = "Converting result to option needlessly constructs a backtrace that then gets thrown away" }
1415
]

0 commit comments

Comments
 (0)