From 3acdfb304d3511b795075eb249a0c1f93be667ac Mon Sep 17 00:00:00 2001 From: David Mak Date: Tue, 11 Jun 2024 14:56:04 +0800 Subject: [PATCH] meta: Apply clippy suggestions --- nac3core/src/toplevel/composer.rs | 2 +- nac3core/src/typecheck/type_inferencer/mod.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/nac3core/src/toplevel/composer.rs b/nac3core/src/toplevel/composer.rs index 0064a6bc..1b149ce7 100644 --- a/nac3core/src/toplevel/composer.rs +++ b/nac3core/src/toplevel/composer.rs @@ -105,7 +105,7 @@ impl TopLevelComposer { builtin_id.insert(name, DefinitionId(id)); } else if let TopLevelDef::Class { name, constructor, object_id, .. } = &*def { - assert_eq!(id, object_id.0, "Object id of class '{}' should match its index in builtin name list", name); + assert_eq!(id, object_id.0, "Object id of class '{name}' should match its index in builtin name list"); if let Some(constructor) = constructor { builtin_ty.insert(*name, *constructor); } diff --git a/nac3core/src/typecheck/type_inferencer/mod.rs b/nac3core/src/typecheck/type_inferencer/mod.rs index 88b27f01..e9b62cb0 100644 --- a/nac3core/src/typecheck/type_inferencer/mod.rs +++ b/nac3core/src/typecheck/type_inferencer/mod.rs @@ -812,7 +812,7 @@ impl<'a> Inferencer<'a> { location: Location, func: &ast::Expr<()>, args: &mut Vec>, - keywords: &Vec>, + keywords: &[Located], ) -> Result>>, HashSet> { let Located { location: func_location, node: ExprKind::Name { id, ctx }, .. } = func else { return Ok(None)