Rustacean
Search
Search
Dark mode
Light mode
Explorer
Home
❯
antipatterns
Folder: antipatterns
68 items under this folder.
Jun 21, 2026
Ambiguous macro_rules Matchers
rust
macros
macro-rules
antipattern
Jun 21, 2026
Assuming String Indexes Are Characters
rust
string
unicode
indexing
antipattern
Jun 21, 2026
Assuming wasm32 Means Browser
rust
wasm
cfg
browser
targets
antipattern
Jun 21, 2026
Avoiding Premature Optimization
rust
performance
optimization
antipattern
Jun 21, 2026
Blocking in Async
rust
async
blocking
futures
antipattern
Jun 21, 2026
Blocking the Async Executor
rust
async
tokio
blocking
Jun 21, 2026
Broad should_panic Tests
rust
testing
panic
Jun 21, 2026
Deref Polymorphism Antipattern
rust
deref
traits
composition
antipattern
Jun 21, 2026
Eager Work in Option and Result Defaults
rust
std
option
result
lazy-evaluation
antipattern
combinators
Jun 21, 2026
Expecting Per-Field Mutability in Structs
rust
structs
mutability
footgun
Jun 21, 2026
Fire-and-Forget Tokio Tasks
rust
async
tokio
tasks
Jun 21, 2026
Glob Imports in Public Code
rust
glob-imports
use
footgun
Jun 21, 2026
HashMap Iteration Order Is Arbitrary
rust
collections
hashmap
testing
determinism
Jun 21, 2026
Holding Collection Element References Across Mutation
rust
collections
borrowing
footgun
Jun 21, 2026
Holding Locks Across Await
rust
async
locks
mutex
Jun 21, 2026
Holding Locks Too Long
rust
concurrency
locks
mutex
Jun 21, 2026
Ignoring Channel Disconnects
rust
concurrency
channels
shutdown
Jun 21, 2026
Implementing Borrow for Partial Views
rust
borrow
hashmap
api-design
Jun 21, 2026
Index Panics vs get
rust
indexing
option
panic
antipattern
Jun 21, 2026
Integer Overflow Assumptions
rust
integers
overflow
arithmetic
antipattern
Jun 21, 2026
Is Some Then Unwrap
rust
option
pattern-matching
unwrap
antipattern
Jun 21, 2026
Lock Order Reversal
rust
concurrency
deadlock
locks
Jun 21, 2026
Long-Lived RefCell Borrows
rust
refcell
borrowing
antipattern
interior-mutability
Jun 21, 2026
Manual Index Loops for Speed
rust
iterators
performance
footgun
Jun 21, 2026
Moving Out of FnMut Closures
rust
closures
fnmut
footgun
Jun 21, 2026
Mutating Collection Keys In Place
rust
collections
hashmap
btreemap
invariants
Jun 21, 2026
Needless Clone
rust
ownership
clone
performance
antipattern
Jun 21, 2026
Non-Additive Feature Flags
rust
cargo
features
semver
Jun 21, 2026
Non-Cancellation-Safe select! Branches
rust
async
tokio
cancellation
select
Jun 21, 2026
Non-dyn-Compatible Traits as Trait Objects
rust
antipattern
dyn
object-safety
Jun 21, 2026
Overbroad Catch-All Match Arms
rust
match
wildcard
footgun
Jun 21, 2026
Overbroad Version Requirements
rust
cargo
dependencies
semver
Jun 21, 2026
Overconstraining Lifetimes
rust
lifetimes
borrowing
antipattern
Jun 21, 2026
Overgeneric Public APIs
rust
generics
api-design
antipattern
Jun 21, 2026
Overusing Trait Objects
rust
antipattern
trait-objects
performance
Jun 21, 2026
Panicking From Implementations
rust
conversions
panic
api-design
Jun 21, 2026
Panicking in Libraries
rust
panic
libraries
api-design
Jun 21, 2026
Partially Moved Structs with Update Syntax
rust
structs
move-semantics
footgun
Jun 21, 2026
Pattern Variable Shadowing
rust
patterns
shadowing
footgun
Jun 21, 2026
Premature Arc Mutex
rust
concurrency
arc
mutex
antipattern
Jun 21, 2026
Rc RefCell Overuse
rust
rc
refcell
interior-mutability
antipattern
Jun 21, 2026
Relying on Integer Overflow
rust
antipattern
integers
overflow
Jun 21, 2026
Returning References to Locals
rust
ownership
lifetimes
borrowing
Jun 21, 2026
Sentinel Values
rust
option
result
invariants
antipattern
Jun 21, 2026
Shared State Between Parallel Tests
rust
testing
parallelism
Jun 21, 2026
Silencing Edition Migration Lints
rust
editions
lints
migration
Jun 21, 2026
Speculative Micro-Optimization
rust
performance
micro-optimization
antipattern
Jun 21, 2026
Stale Slice Indices
rust
ownership
slices
footgun
Jun 21, 2026
Storing References in Structs Without Lifetimes
rust
structs
lifetimes
references
footgun
Jun 21, 2026
String Byte Indexing
rust
strings
utf8
footgun
Jun 21, 2026
Stringly-Typed Code
rust
types
newtype
enum
antipattern
Jun 21, 2026
Stringly-Typed Errors
rust
errors
strings
api-design
Jun 21, 2026
Swallowing Errors
rust
errors
diagnostics
logging
Jun 21, 2026
The static mut Footgun and &raw
rust
unsafe
static-mut
antipattern
Jun 21, 2026
Transmute as a Shortcut
rust
unsafe
transmute
antipattern
Jun 21, 2026
Treating mod as include
rust
modules
mod
footgun
Jun 21, 2026
Unchecked cfg Names
rust
cfg
lints
footgun
Jun 21, 2026
Unconsumed Iterator Adapters
rust
iterators
lazy
footgun
Jun 21, 2026
Uncovered Type Parameters in Foreign Impl
rust
coherence
orphan-rule
traits
antipattern
Jun 21, 2026
Unhygienic Procedural Macro Output
rust
macros
procedural-macros
hygiene
antipattern
Jun 21, 2026
Unnecessary Bounds on Data Types
rust
generics
bounds
antipattern
Jun 21, 2026
Unnecessary Collect
rust
iterators
collect
allocation
antipattern
Jun 21, 2026
Unsafe Send and Sync Implementations
rust
concurrency
unsafe
send
sync
Jun 21, 2026
Unsynchronized static mut in Interrupts
rust
embedded
interrupts
unsafe
Jun 21, 2026
Untested Documentation Examples
rust
documentation
doctest
Jun 21, 2026
Unwrap and Expect Overuse
rust
unwrap
expect
panic
Jun 21, 2026
Using Type Aliases as Newtypes
rust
antipattern
aliases
newtype
type-safety
Jun 21, 2026
Using rustc Directly for Cargo-Sized Projects
rust
rustc
cargo
antipattern
tooling