Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
Retra
on Nov 11, 2016
|
parent
|
context
|
favorite
| on:
Announcing Rust 1.13
>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()
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search:
You can just map your logging in between:
foo().map_err(|e| {log(e); e}).bar()