You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/PANIC_POLICY.md
+6-1Lines changed: 6 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,11 @@ Library code should return `Result` for caller-controlled invalid input. Panics
6
6
7
7
- Public rendering APIs return `AvatarSpecError` for unsupported dimensions instead of panicking.
8
8
- Rectangle helpers use saturating or clamping arithmetic so future internal placement changes cannot overflow or panic in these helpers.
9
+
-`AvatarIdentity::byte` uses a debug-only assertion to catch internal digest
10
+
offset mistakes in tests and debug builds. Release builds keep the
11
+
non-panicking fallback for defense in depth.
9
12
- Tests may use `expect`, `panic`, and related assertions freely.
10
13
11
-
New production `unwrap`, `expect`, `panic`, or `unreachable` sites should be added only with a concrete invariant and a matching update to the validation script.
14
+
New production `unwrap`, `expect`, `panic`, `debug_assert`, or `unreachable`
15
+
sites should be added only with a concrete invariant and a matching update to
0 commit comments