chore: ensure macro is prepared for potential pretty printing improvements

See https://github.com/rust-lang/rust/pull/117433#issuecomment-1793881869
This commit is contained in:
tjallingt 2023-11-08 09:26:35 +01:00 committed by GitHub
parent 012fac2608
commit 91d6b12258
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -35,7 +35,13 @@ pub fn fn_builder(_attr: TokenStream, item: TokenStream) -> TokenStream {
let param: Vec<String> = args let param: Vec<String> = args
.iter() .iter()
.map(|arg| arg.split_whitespace().next().unwrap().to_string()) .map(|arg| {
arg.split_whitespace()
.next()
.unwrap()
.trim_end_matches(":")
.to_string()
})
.collect(); .collect();
#[rustfmt::skip] #[rustfmt::skip]