about summary refs log tree commit diff
path: root/library/stdarch/crates/assert-instr-macro
diff options
context:
space:
mode:
authorEduardo Sánchez Muñoz <eduardosm-dev@e64.io>2023-10-30 13:31:49 +0100
committerAmanieu d'Antras <amanieu@gmail.com>2023-10-31 02:20:17 +0100
commit9f741c5986f65f1e5e3ba10821d78e9de216231f (patch)
treedad16972d766bd38585c3ba968f01170b01f6837 /library/stdarch/crates/assert-instr-macro
parent02156819c9464f3128dfcd8b8873c6c5fa6fafb0 (diff)
downloadrust-9f741c5986f65f1e5e3ba10821d78e9de216231f.tar.gz
rust-9f741c5986f65f1e5e3ba10821d78e9de216231f.zip
Simplify some expressions with pointers and references
Diffstat (limited to 'library/stdarch/crates/assert-instr-macro')
-rw-r--r--library/stdarch/crates/assert-instr-macro/src/lib.rs4
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");