forked from M-Labs/nac3
meta: Apply clippy suggestions
This commit is contained in:
parent
6e24da9cc5
commit
3acdfb304d
|
@ -105,7 +105,7 @@ impl TopLevelComposer {
|
||||||
builtin_id.insert(name, DefinitionId(id));
|
builtin_id.insert(name, DefinitionId(id));
|
||||||
} else if let TopLevelDef::Class { name, constructor, object_id, .. } = &*def
|
} 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 {
|
if let Some(constructor) = constructor {
|
||||||
builtin_ty.insert(*name, *constructor);
|
builtin_ty.insert(*name, *constructor);
|
||||||
}
|
}
|
||||||
|
|
|
@ -812,7 +812,7 @@ impl<'a> Inferencer<'a> {
|
||||||
location: Location,
|
location: Location,
|
||||||
func: &ast::Expr<()>,
|
func: &ast::Expr<()>,
|
||||||
args: &mut Vec<ast::Expr<()>>,
|
args: &mut Vec<ast::Expr<()>>,
|
||||||
keywords: &Vec<Located<ast::KeywordData>>,
|
keywords: &[Located<ast::KeywordData>],
|
||||||
) -> Result<Option<ast::Expr<Option<Type>>>, HashSet<String>> {
|
) -> Result<Option<ast::Expr<Option<Type>>>, HashSet<String>> {
|
||||||
let Located { location: func_location, node: ExprKind::Name { id, ctx }, .. } = func else {
|
let Located { location: func_location, node: ExprKind::Name { id, ctx }, .. } = func else {
|
||||||
return Ok(None)
|
return Ok(None)
|
||||||
|
|
Loading…
Reference in New Issue