diff --git a/src/libstd/option.rs b/src/libstd/option.rs index 86f8c143a9e99..bfb0bf35016d0 100644 --- a/src/libstd/option.rs +++ b/src/libstd/option.rs @@ -220,10 +220,7 @@ impl Option { /// Return a mutable iterator over the possibly contained value #[inline] pub fn mut_iter<'r>(&'r mut self) -> Item<&'r mut T> { - match *self { - Some(ref mut x) => Item{opt: Some(x)}, - None => Item{opt: None} - } + Item{opt: self.as_mut()} } /// Return a consuming iterator over the possibly contained value