1
0
forked from M-Labs/nac3

meta: Apply clippy suggestions

This commit is contained in:
David Mak 2024-06-11 14:56:04 +08:00
parent 6e24da9cc5
commit 3acdfb304d
2 changed files with 2 additions and 2 deletions

View File

@ -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);
}

View File

@ -812,7 +812,7 @@ impl<'a> Inferencer<'a> {
location: Location,
func: &ast::Expr<()>,
args: &mut Vec<ast::Expr<()>>,
keywords: &Vec<Located<ast::KeywordData>>,
keywords: &[Located<ast::KeywordData>],
) -> Result<Option<ast::Expr<Option<Type>>>, HashSet<String>> {
let Located { location: func_location, node: ExprKind::Name { id, ctx }, .. } = func else {
return Ok(None)