Skip to content

Commit 6d57679

Browse files
committed
to_tokens
1 parent fb45e06 commit 6d57679

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/generate/device.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -170,12 +170,10 @@ pub fn render(d: &Device, config: &Config, device_x: &mut String) -> Result<Toke
170170
} else {
171171
let mut tokens = syn::parse_file(generic_file)?.into_token_stream();
172172
if config.target == Target::Msp430 && config.nightly {
173-
let generic_msp430_atomic = syn::parse_file(msp430_atomic_file)?.into_token_stream();
174-
tokens.extend(generic_msp430_atomic);
173+
syn::parse_file(msp430_atomic_file)?.to_tokens(&mut tokens);
175174
}
176175
if config.const_generic {
177-
let generic_array_proxy = syn::parse_file(array_proxy)?.into_token_stream();
178-
tokens.extend(generic_array_proxy);
176+
syn::parse_file(array_proxy)?.to_tokens(&mut tokens);
179177
}
180178

181179
out.extend(quote! {

0 commit comments

Comments
 (0)