@@ -183,15 +183,15 @@ pub trait Char {
183
183
/// If the buffer is not large enough, nothing will be written into it
184
184
/// and a `None` will be returned.
185
185
#[ unstable = "pending trait organization" ]
186
- fn encode_utf8 ( & self , dst : & mut [ u8 ] ) -> Option < uint > ;
186
+ fn encode_utf8 ( self , dst : & mut [ u8 ] ) -> Option < uint > ;
187
187
188
188
/// Encodes this character as UTF-16 into the provided `u16` buffer,
189
189
/// and then returns the number of `u16`s written.
190
190
///
191
191
/// If the buffer is not large enough, nothing will be written into it
192
192
/// and a `None` will be returned.
193
193
#[ unstable = "pending trait organization" ]
194
- fn encode_utf16 ( & self , dst : & mut [ u16 ] ) -> Option < uint > ;
194
+ fn encode_utf16 ( self , dst : & mut [ u16 ] ) -> Option < uint > ;
195
195
}
196
196
197
197
#[ experimental = "trait is experimental" ]
@@ -260,9 +260,9 @@ impl Char for char {
260
260
261
261
#[ inline]
262
262
#[ unstable = "pending error conventions, trait organization" ]
263
- fn encode_utf8 < ' a > ( & self , dst : & ' a mut [ u8 ] ) -> Option < uint > {
263
+ fn encode_utf8 ( self , dst : & mut [ u8 ] ) -> Option < uint > {
264
264
// Marked #[inline] to allow llvm optimizing it away
265
- let code = * self as u32 ;
265
+ let code = self as u32 ;
266
266
if code < MAX_ONE_B && dst. len ( ) >= 1 {
267
267
dst[ 0 ] = code as u8 ;
268
268
Some ( 1 )
@@ -288,9 +288,9 @@ impl Char for char {
288
288
289
289
#[ inline]
290
290
#[ unstable = "pending error conventions, trait organization" ]
291
- fn encode_utf16 ( & self , dst : & mut [ u16 ] ) -> Option < uint > {
291
+ fn encode_utf16 ( self , dst : & mut [ u16 ] ) -> Option < uint > {
292
292
// Marked #[inline] to allow llvm optimizing it away
293
- let mut ch = * self as u32 ;
293
+ let mut ch = self as u32 ;
294
294
if ( ch & 0xFFFF_u32 ) == ch && dst. len ( ) >= 1 {
295
295
// The BMP falls through (assuming non-surrogate, as it should)
296
296
dst[ 0 ] = ch as u16 ;
0 commit comments