High Rust

Understand ownership and borrowing

Rule Description

Prefer borrowing (&T, &mut T) to avoid moves. Use ownership for transfers. Clone for small Copy types is fine. Lifetimes express relationships, don't avoid them.

Included in Rulesets

Code Review Standards
214 rules • 0 standards
View

Add This Rule

Sign in to add this rule to your workspace

Sign in with GitHub

Details

Severity
High
Category
Rust
Used in
1 ruleset