14 ms·
>I also sometimes include log statements in specific error branches for debugging and delete them afterwards. That's trivially possible in the Go version but re
by Retra 10y ago
>I also sometimes include log statements in specific error branches for debugging and delete them afterwards. That's trivially possible in the Go version but requires more effort in the shorter variants
You can just map your logging in between:
foo().map_err(|e| {log(e); e}).bar()