Skip to content

Commit f5c071c

Browse files
committed
run rustfmt on librustc_unicode
1 parent 382ab92 commit f5c071c

File tree

3 files changed

+17
-13
lines changed

3 files changed

+17
-13
lines changed

src/librustc_unicode/char.rs

+10-8
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,13 @@
3030

3131
use core::char::CharExt as C;
3232
use core::fmt;
33-
use tables::{derived_property, property, general_category, conversions};
33+
use tables::{conversions, derived_property, general_category, property};
3434

3535
// stable reexports
3636
#[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};
3838
#[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};
4040

4141
// unstable reexports
4242
#[unstable(feature = "unicode", issue = "27783")]
@@ -808,16 +808,18 @@ pub fn decode_utf16<I: IntoIterator<Item = u16>>(iter: I) -> DecodeUtf16<I::Into
808808
}
809809

810810
#[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> {
812812
type Item = Result<char, DecodeUtf16Error>;
813813

814814
fn next(&mut self) -> Option<Result<char, DecodeUtf16Error>> {
815815
let u = match self.buf.take() {
816816
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+
}
821823
};
822824

823825
if u < 0xD800 || 0xDFFF < u {

src/librustc_unicode/lib.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,14 @@ pub mod char;
4343

4444
#[allow(deprecated)]
4545
pub mod str {
46-
pub use u_str::{UnicodeStr, SplitWhitespace};
47-
pub use u_str::{utf8_char_width, is_utf16};
48-
pub use u_str::{Utf16Encoder};
46+
pub use u_str::{SplitWhitespace, UnicodeStr};
47+
pub use u_str::{is_utf16, utf8_char_width};
48+
pub use u_str::Utf16Encoder;
4949
}
5050

5151
// For use in libcollections, not re-exported in libstd.
5252
pub mod derived_property {
53-
pub use tables::derived_property::{Cased, Case_Ignorable};
53+
pub use tables::derived_property::{Case_Ignorable, Cased};
5454
}
5555

5656
// For use in libsyntax

src/librustc_unicode/u_str.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,9 @@ impl<I> Utf16Encoder<I> {
144144
}
145145
}
146146

147-
impl<I> Iterator for Utf16Encoder<I> where I: Iterator<Item=char> {
147+
impl<I> Iterator for Utf16Encoder<I>
148+
where I: Iterator<Item = char>
149+
{
148150
type Item = u16;
149151

150152
#[inline]

0 commit comments

Comments
 (0)