for x in xs.iter_mut() -> for x in &mut xs

Also `for x in option.iter_mut()` -> `if let Some(ref mut x) = option`
This commit is contained in:
Jorge Aparicio
2015-01-31 20:02:00 -05:00
parent d5d7e6565a
commit d5f61b4332
34 changed files with 54 additions and 54 deletions

View File

@@ -134,7 +134,7 @@ impl AsciiExt<Vec<u8>> for [u8] {
impl OwnedAsciiExt for Vec<u8> {
#[inline]
fn into_ascii_uppercase(mut self) -> Vec<u8> {
for byte in self.iter_mut() {
for byte in &mut self {
*byte = byte.to_ascii_uppercase();
}
self
@@ -142,7 +142,7 @@ impl OwnedAsciiExt for Vec<u8> {
#[inline]
fn into_ascii_lowercase(mut self) -> Vec<u8> {
for byte in self.iter_mut() {
for byte in &mut self {
*byte = byte.to_ascii_lowercase();
}
self