Skip to content

Commit 6c3665c

Browse files
committed
Use Tokens::into_string
1 parent 157fca4 commit 6c3665c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

macros/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,13 +88,13 @@ define_proc_macros! {
8888
map.build(&mut initializer_bytes).unwrap();
8989
tokens.append(::std::str::from_utf8(&initializer_bytes).unwrap());
9090
tokens.append(";");
91-
tokens.to_string()
91+
tokens.into_string()
9292
}
9393
}
9494

9595
fn max_len<I: Iterator<Item=usize>>(lengths: I) -> String {
9696
let max_length = lengths.max().expect("expected at least one string");
97-
quote!( const MAX_LENGTH: usize = #max_length; ).to_string()
97+
quote!( const MAX_LENGTH: usize = #max_length; ).into_string()
9898
}
9999

100100
fn string_literal(token: &syn::TokenTree) -> &str {

0 commit comments

Comments
 (0)