]> git.lizzy.rs Git - rust.git/blobdiff - src/libcore/char/mod.rs
Various minor/cosmetic improvements to code
[rust.git] / src / libcore / char / mod.rs
index 5be673db3200d8b3696749443520c48bafeb964b..e07a0f5d712b03cf75332e53925cdbbc4ac2657a 100644 (file)
@@ -131,7 +131,7 @@ pub struct EscapeUnicode {
     state: EscapeUnicodeState,
 
     // The index of the next hex digit to be printed (0 if none),
-    // i.e. the number of remaining hex digits to be printed;
+    // i.e., the number of remaining hex digits to be printed;
     // increasing from the least significant digit: 0x543210
     hex_digit_idx: usize,
 }
@@ -312,8 +312,8 @@ fn nth(&mut self, n: usize) -> Option<char> {
                     None
                 }
             },
-            EscapeDefaultState::Done => return None,
-            EscapeDefaultState::Unicode(ref mut i) => return i.nth(n),
+            EscapeDefaultState::Done => None,
+            EscapeDefaultState::Unicode(ref mut i) => i.nth(n),
         }
     }