Consider adding #[must_use]
annotation to some types, functions, and macros
#188
Labels
compatibility-breaking
Changes that are (likely to be) breaking
The functions that probably need this the most are the
write_to_xxx
methods. These return anOption<()>
, and so it'd be easy to callwrite_to_xxx
, ignore this return value, and assume that the write had unconditionally succeeded (or assume that, as is often the case in Rust APIs, the method will panic on failure.We should also use
#[must_use]
intransmute!
,transmute_ref!
, andtransmute_mut!
, as they are side effect-free.See also #284
The text was updated successfully, but these errors were encountered: