Skip to content

Commit a7a8682

Browse files
authored
Fix clippy warning in procedural macro example
I copy+pasted this example into my code and the `clippy::to_string_in_format_args` lint fired.
1 parent 984b36e commit a7a8682

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/procedural-macros.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -234,8 +234,8 @@ shown in the comments after the function prefixed with "out:".
234234
235235
#[proc_macro_attribute]
236236
pub fn show_streams(attr: TokenStream, item: TokenStream) -> TokenStream {
237-
println!("attr: \"{}\"", attr.to_string());
238-
println!("item: \"{}\"", item.to_string());
237+
println!("attr: \"{attr}\"");
238+
println!("item: \"{item}\"");
239239
item
240240
}
241241
```

0 commit comments

Comments
 (0)