@@ -16,7 +16,7 @@ use ext::tt::transcribe::tt_next_token;
16
16
use parse:: token;
17
17
use parse:: token:: str_to_ident;
18
18
19
- use std:: borrow:: { IntoCow , Cow } ;
19
+ use std:: borrow:: Cow ;
20
20
use std:: char;
21
21
use std:: fmt;
22
22
use std:: mem:: replace;
@@ -293,15 +293,15 @@ impl<'a> StringReader<'a> {
293
293
let next = i + ch. len_utf8 ( ) ;
294
294
if ch == '\r' {
295
295
if next < s. len ( ) && s. char_at ( next) == '\n' {
296
- return translate_crlf_ ( self , start, s, errmsg, i) . into_cow ( ) ;
296
+ return translate_crlf_ ( self , start, s, errmsg, i) . into ( ) ;
297
297
}
298
298
let pos = start + BytePos ( i as u32 ) ;
299
299
let end_pos = start + BytePos ( next as u32 ) ;
300
300
self . err_span_ ( pos, end_pos, errmsg) ;
301
301
}
302
302
i = next;
303
303
}
304
- return s. into_cow ( ) ;
304
+ return s. into ( ) ;
305
305
306
306
fn translate_crlf_ ( rdr : & StringReader , start : BytePos ,
307
307
s : & str , errmsg : & str , mut i : usize ) -> String {
@@ -564,7 +564,7 @@ impl<'a> StringReader<'a> {
564
564
let string = if has_cr {
565
565
self . translate_crlf ( start_bpos, string,
566
566
"bare CR not allowed in block doc-comment" )
567
- } else { string. into_cow ( ) } ;
567
+ } else { string. into ( ) } ;
568
568
token:: DocComment ( token:: intern ( & string[ ..] ) )
569
569
} else {
570
570
token:: Comment
0 commit comments