Reliability: remove all "unwrap()" and deny their use
To prohibit the use of unwrap()
, add this line to the root of each crate (lib.rs
file):
`#![deny(clippy::option_unwrap_used, clippy::result_unwrap_used)]`
Then replace all unwrap() by unwrap! macro :
`expr.unwrap() -> unwrap!(expr)`
The unwrap! macro displays the name of the source file and the line number, in case of a bug related to an unwrap, it allows to immediately find the unwrap in fault.
Stabilization commit can be the subject of a new type of commit: [stab]
(to be added to the doc). Otherwise, use the [fix]
type because it can prevent future bugs.
Edited by Éloïs