@@ -692,19 +692,19 @@ pub fn is_utf16(v: &[u16]) -> bool {
692
692
/// An iterator that decodes UTF-16 encoded codepoints from a vector
693
693
/// of `u16`s.
694
694
#[ deriving( Clone ) ]
695
- pub struct UTF16Items < ' a > {
695
+ pub struct Utf16Items < ' a > {
696
696
iter : slice:: Items < ' a , u16 >
697
697
}
698
698
/// The possibilities for values decoded from a `u16` stream.
699
699
#[ deriving( Eq , TotalEq , Clone , Show ) ]
700
- pub enum UTF16Item {
700
+ pub enum Utf16Item {
701
701
/// A valid codepoint.
702
702
ScalarValue ( char ) ,
703
703
/// An invalid surrogate without its pair.
704
704
LoneSurrogate ( u16 )
705
705
}
706
706
707
- impl UTF16Item {
707
+ impl Utf16Item {
708
708
/// Convert `self` to a `char`, taking `LoneSurrogate`s to the
709
709
/// replacement character (U+FFFD).
710
710
#[ inline]
@@ -716,8 +716,8 @@ impl UTF16Item {
716
716
}
717
717
}
718
718
719
- impl < ' a > Iterator < UTF16Item > for UTF16Items < ' a > {
720
- fn next ( & mut self ) -> Option < UTF16Item > {
719
+ impl < ' a > Iterator < Utf16Item > for Utf16Items < ' a > {
720
+ fn next ( & mut self ) -> Option < Utf16Item > {
721
721
let u = match self . iter . next ( ) {
722
722
Some ( u) => * u,
723
723
None => return None
@@ -781,8 +781,8 @@ impl<'a> Iterator<UTF16Item> for UTF16Items<'a> {
781
781
/// ScalarValue('i'), ScalarValue('c'),
782
782
/// LoneSurrogate(0xD834)]);
783
783
/// ```
784
- pub fn utf16_items < ' a > ( v : & ' a [ u16 ] ) -> UTF16Items < ' a > {
785
- UTF16Items { iter : v. iter ( ) }
784
+ pub fn utf16_items < ' a > ( v : & ' a [ u16 ] ) -> Utf16Items < ' a > {
785
+ Utf16Items { iter : v. iter ( ) }
786
786
}
787
787
788
788
/// Return a slice of `v` ending at (and not including) the first NUL
0 commit comments