diff options
| author | Eduardo Sánchez Muñoz <eduardosm-dev@e64.io> | 2023-10-30 13:31:49 +0100 |
|---|---|---|
| committer | Amanieu d'Antras <amanieu@gmail.com> | 2023-10-31 02:20:17 +0100 |
| commit | 9f741c5986f65f1e5e3ba10821d78e9de216231f (patch) | |
| tree | dad16972d766bd38585c3ba968f01170b01f6837 /library/stdarch/crates/assert-instr-macro/src | |
| parent | 02156819c9464f3128dfcd8b8873c6c5fa6fafb0 (diff) | |
| download | rust-9f741c5986f65f1e5e3ba10821d78e9de216231f.tar.gz rust-9f741c5986f65f1e5e3ba10821d78e9de216231f.zip | |
Simplify some expressions with pointers and references
Diffstat (limited to 'library/stdarch/crates/assert-instr-macro/src')
| -rw-r--r-- | library/stdarch/crates/assert-instr-macro/src/lib.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/library/stdarch/crates/assert-instr-macro/src/lib.rs b/library/stdarch/crates/assert-instr-macro/src/lib.rs index 14912f0ca6a..4821a31617f 100644 --- a/library/stdarch/crates/assert-instr-macro/src/lib.rs +++ b/library/stdarch/crates/assert-instr-macro/src/lib.rs @@ -89,7 +89,7 @@ pub fn assert_instr( syn::Pat::Ident(ref i) => &i.ident, _ => panic!("must have bare arguments"), }; - if let Some(&(_, ref tokens)) = invoc.args.iter().find(|a| *ident == a.0) { + if let Some((_, tokens)) = invoc.args.iter().find(|a| *ident == a.0) { input_vals.push(quote! { #tokens }); } else { inputs.push(capture); @@ -104,7 +104,7 @@ pub fn assert_instr( v.clone().into_token_stream() ), }; - if let Some(&(_, ref tokens)) = invoc.args.iter().find(|a| c.ident == a.0) { + if let Some((_, tokens)) = invoc.args.iter().find(|a| c.ident == a.0) { const_vals.push(quote! { #tokens }); } else { panic!("const generics must have a value for tests"); |
