Correct the use of must_use on btree::IterMut

Signed-off-by: Jonathan Brouwer <jonathantbrouwer@gmail.com>
This commit is contained in:
Jonathan Brouwer
2025-08-04 22:20:30 +02:00
parent e1b9081e69
commit b3317dd055
+1 -1
View File
@@ -382,6 +382,7 @@ fn default() -> Self {
/// documentation for more.
///
/// [`iter_mut`]: BTreeMap::iter_mut
#[must_use = "iterators are lazy and do nothing unless consumed"]
#[stable(feature = "rust1", since = "1.0.0")]
pub struct IterMut<'a, K: 'a, V: 'a> {
range: LazyLeafRange<marker::ValMut<'a>, K, V>,
@@ -391,7 +392,6 @@ pub struct IterMut<'a, K: 'a, V: 'a> {
_marker: PhantomData<&'a mut (K, V)>,
}
#[must_use = "iterators are lazy and do nothing unless consumed"]
#[stable(feature = "collection_debug", since = "1.17.0")]
impl<K: fmt::Debug, V: fmt::Debug> fmt::Debug for IterMut<'_, K, V> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {