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: AGENTS.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -95,6 +95,8 @@ If changes are needed in these files, that must happen in the separate Positron
95
95
96
96
- Use fully qualified result types (`anyhow::Result`) instead of importing them.
97
97
98
+
- You can log `Result::Err` by using the `.log_err()` method from the extension trait `stdext::ResultExt`. Add some `.context()` if that would be helpful, but never do it for errors that are quite unexpected, such as from `.send()` to a channel (that would be too verbose).
99
+
98
100
- When writing tests, prefer simple assertion macros without custom error messages:
99
101
- Use `assert_eq!(actual, expected);` instead of `assert_eq!(actual, expected, "custom message");`
100
102
- Use `assert!(condition);` instead of `assert!(condition, "custom message");`
0 commit comments