Skip to content

Commit 7b2bee4

Browse files
docs: add docs/CODING-STYLE.md Rust style guide
1 parent 644abfc commit 7b2bee4

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

docs/CODING-STYLE.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Coding Style
2+
3+
## Formatting
4+
- cargo fmt is canonical
5+
- 4-space indent
6+
- Max line 100 chars
7+
8+
## Patterns
9+
- Prefer ? over match for error propagation
10+
- Use anyhow for app errors, thiserror for library errors
11+
- Avoid unwrap() in production paths; use expect() with context
12+
13+
## Naming
14+
- snake_case for fns/vars, PascalCase for types
15+
- Single-letter lifetimes only in small scopes

0 commit comments

Comments
 (0)