-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Open
Description
We have so many great functions to handle errors on a Result, but we have nothing to simply eprintln! it and go our merry way. Sometimes it's nice to always print the error (if any) without actually handling it.
This is one such example using channels for events:
tx.try_send(event)
.inspect_err(|e| eprintln!("{e}"))
.ok();Could be just:
tx.try_send(event)
.print_err()
.ok();I know it's not a huge deal, but the repetition of using the same exact format string every time got to me :)
zachs18 and BilakshanPkennytm and fmease
Metadata
Metadata
Assignees
Labels
No labels