2 ms·
No problem! > That unwrap should not be used in the kernel, correct? More or less. There could be situations where you know the error is impossible and it is
by loeg 6y ago
No problem!
> That unwrap should not be used in the kernel, correct?
More or less. There could be situations where you know the error is impossible and it is reasonable to unwrap. But it's a good rule of thumb.
> That I should be very careful about the external libraries I use and look for the presence of panic! and/or unwrap, or use https://docs.rs/no-panic/0.1.13/no_panic/ https://docs.rs/no-panic/0.1.13/no_panic/ as jononor commented here below. But I guess this might rule-out some useful libraries from a project.
Absolutely! Use of unsafe is another potential watch-point.