@@ -119,6 +119,7 @@ impl char {
119119 /// assert_eq!('f'.to_digit(16), Some(15));
120120 /// ```
121121 #[ stable( feature = "rust1" , since = "1.0.0" ) ]
122+ #[ inline]
122123 pub fn to_digit ( self , radix : u32 ) -> Option < u32 > { C :: to_digit ( self , radix) }
123124
124125 /// Returns an iterator that yields the hexadecimal Unicode escape of a
@@ -157,6 +158,7 @@ impl char {
157158 /// assert_eq!(heart, r"\u{2764}");
158159 /// ```
159160 #[ stable( feature = "rust1" , since = "1.0.0" ) ]
161+ #[ inline]
160162 pub fn escape_unicode ( self ) -> EscapeUnicode { C :: escape_unicode ( self ) }
161163
162164 /// Returns an iterator that yields the 'default' ASCII and
@@ -195,6 +197,7 @@ impl char {
195197 /// assert_eq!(quote, "\\\"");
196198 /// ```
197199 #[ stable( feature = "rust1" , since = "1.0.0" ) ]
200+ #[ inline]
198201 pub fn escape_default ( self ) -> EscapeDefault { C :: escape_default ( self ) }
199202
200203 /// Returns the number of bytes this character would need if encoded in
@@ -208,6 +211,7 @@ impl char {
208211 /// assert_eq!(n, 2);
209212 /// ```
210213 #[ stable( feature = "rust1" , since = "1.0.0" ) ]
214+ #[ inline]
211215 pub fn len_utf8 ( self ) -> usize { C :: len_utf8 ( self ) }
212216
213217 /// Returns the number of 16-bit code units this character would need if
@@ -221,6 +225,7 @@ impl char {
221225 /// assert_eq!(n, 1);
222226 /// ```
223227 #[ stable( feature = "rust1" , since = "1.0.0" ) ]
228+ #[ inline]
224229 pub fn len_utf16 ( self ) -> usize { C :: len_utf16 ( self ) }
225230
226231 /// Encodes this character as UTF-8 into the provided byte buffer, and then
@@ -255,6 +260,7 @@ impl char {
255260 /// ```
256261 #[ unstable( feature = "unicode" ,
257262 reason = "pending decision about Iterator/Writer/Reader" ) ]
263+ #[ inline]
258264 pub fn encode_utf8 ( self , dst : & mut [ u8 ] ) -> Option < usize > { C :: encode_utf8 ( self , dst) }
259265
260266 /// Encodes this character as UTF-16 into the provided `u16` buffer, and
@@ -289,6 +295,7 @@ impl char {
289295 /// ```
290296 #[ unstable( feature = "unicode" ,
291297 reason = "pending decision about Iterator/Writer/Reader" ) ]
298+ #[ inline]
292299 pub fn encode_utf16 ( self , dst : & mut [ u16 ] ) -> Option < usize > { C :: encode_utf16 ( self , dst) }
293300
294301 /// Returns whether the specified character is considered a Unicode
@@ -451,5 +458,6 @@ impl char {
451458 since = "1.0.0" ) ]
452459 #[ unstable( feature = "unicode" ,
453460 reason = "needs expert opinion. is_cjk flag stands out as ugly" ) ]
461+ #[ inline]
454462 pub fn width ( self , is_cjk : bool ) -> Option < usize > { charwidth:: width ( self , is_cjk) }
455463}
0 commit comments