TIL: #[track_caller] gives panics the right line number
Put #[track_caller] on a helper that can panic, and the panic message points at the code that called it instead of the helper itself.
67 words1 min read
Categories
Today I learned. One concept, a few minutes. · 1 articles