|
30 | 30 |
|
31 | 31 | use core::char::CharExt as C; |
32 | 32 | use core::fmt; |
33 | | -use tables::{derived_property, property, general_category, conversions}; |
| 33 | +use tables::{conversions, derived_property, general_category, property}; |
34 | 34 |
|
35 | 35 | // stable reexports |
36 | 36 | #[stable(feature = "rust1", since = "1.0.0")] |
37 | | -pub use core::char::{MAX, from_u32, from_u32_unchecked, from_digit}; |
| 37 | +pub use core::char::{MAX, from_digit, from_u32, from_u32_unchecked}; |
38 | 38 | #[stable(feature = "rust1", since = "1.0.0")] |
39 | | -pub use core::char::{EscapeUnicode, EscapeDefault, EncodeUtf8, EncodeUtf16}; |
| 39 | +pub use core::char::{EncodeUtf16, EncodeUtf8, EscapeDefault, EscapeUnicode}; |
40 | 40 |
|
41 | 41 | // unstable reexports |
42 | 42 | #[unstable(feature = "unicode", issue = "27783")] |
@@ -808,16 +808,18 @@ pub fn decode_utf16<I: IntoIterator<Item = u16>>(iter: I) -> DecodeUtf16<I::Into |
808 | 808 | } |
809 | 809 |
|
810 | 810 | #[stable(feature = "decode_utf16", since = "1.9.0")] |
811 | | -impl<I: Iterator<Item=u16>> Iterator for DecodeUtf16<I> { |
| 811 | +impl<I: Iterator<Item = u16>> Iterator for DecodeUtf16<I> { |
812 | 812 | type Item = Result<char, DecodeUtf16Error>; |
813 | 813 |
|
814 | 814 | fn next(&mut self) -> Option<Result<char, DecodeUtf16Error>> { |
815 | 815 | let u = match self.buf.take() { |
816 | 816 | Some(buf) => buf, |
817 | | - None => match self.iter.next() { |
818 | | - Some(u) => u, |
819 | | - None => return None, |
820 | | - }, |
| 817 | + None => { |
| 818 | + match self.iter.next() { |
| 819 | + Some(u) => u, |
| 820 | + None => return None, |
| 821 | + } |
| 822 | + } |
821 | 823 | }; |
822 | 824 |
|
823 | 825 | if u < 0xD800 || 0xDFFF < u { |
|
0 commit comments