Open shepmaster opened 1 year ago
unwrap_or_report()
? or just report()
?
I'd favor unwrap_report
, which is a pattern already seen in wasm bindgen with unwrap_throw
. report
would work too, although this one does not convey so well the idea that it may panic. unwrap_or_report
would falsely suggest that it creates a report instead of panicking.
unwrap_report
sounds like the report is returned in the success (non-divergent) case, as the error is in unwrap_err
. Maybe unwrap_reporting
, with "reporting" modifying, rather than being an argument to, "unwrap"?
And riffing on that could be reporting_unwrap
This would basically boil down to