add #[must_use] to functions of slice and its iterators.

This commit is contained in:
Jendrik
2022-01-13 14:57:57 +01:00
parent 7b0bf9efc9
commit dcdde01aa3
8 changed files with 92 additions and 15 deletions

View File

@@ -172,6 +172,7 @@ impl_fn_for_zst! {
/// documentation for more information.
#[stable(feature = "inherent_ascii_escape", since = "1.60.0")]
#[derive(Clone)]
#[must_use = "iterators are lazy and do nothing unless consumed"]
pub struct EscapeAscii<'a> {
inner: iter::FlatMap<super::Iter<'a, u8>, ascii::EscapeDefault, EscapeByte>,
}