summaryrefslogtreecommitdiff
path: root/bindgen/ir
diff options
context:
space:
mode:
authorChristian Poveda Ruiz <31802960+pvdrz@users.noreply.github.com>2022-11-24 10:50:15 -0500
committerGitHub <noreply@github.com>2022-11-24 10:50:15 -0500
commit73f33e5a0288f4030e1e4389db0d9bfca1d69d2d (patch)
treeb45e94509f5b617d322cd699cb2933ace24f8b99 /bindgen/ir
parent6e5a666507bb5f4611dc31ca2e11e73cb5ffdbd1 (diff)
Fix clippy warnings (#2362)
Diffstat (limited to 'bindgen/ir')
-rw-r--r--bindgen/ir/analysis/template_params.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/bindgen/ir/analysis/template_params.rs b/bindgen/ir/analysis/template_params.rs
index e88b774d..f4f0c59d 100644
--- a/bindgen/ir/analysis/template_params.rs
+++ b/bindgen/ir/analysis/template_params.rs
@@ -424,8 +424,7 @@ impl<'ctx> MonotoneFramework for UsedTemplateParameters<'ctx> {
// generic template parameters are used.
let item_kind =
ctx.resolve_item(item).as_type().map(|ty| ty.kind());
- if let Some(&TypeKind::TemplateInstantiation(ref inst)) = item_kind
- {
+ if let Some(TypeKind::TemplateInstantiation(inst)) = item_kind {
let decl = ctx.resolve_type(inst.template_definition());
let args = inst.template_arguments();
@@ -540,7 +539,7 @@ impl<'ctx> MonotoneFramework for UsedTemplateParameters<'ctx> {
}
// Template instantiations only use their template arguments if the
// template definition uses the corresponding template parameter.
- Some(&TypeKind::TemplateInstantiation(ref inst)) => {
+ Some(TypeKind::TemplateInstantiation(inst)) => {
if self
.allowlisted_items
.contains(&inst.template_definition().into())