Skip to content

Commit

Permalink
fmt and clippy changes
Browse files Browse the repository at this point in the history
  • Loading branch information
danilopedraza committed Apr 13, 2024
1 parent 5689765 commit 833ca07
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/object.rs
Original file line number Diff line number Diff line change
Expand Up @@ -646,7 +646,7 @@ impl DefinedFunction {
}
}

fn match_list(&self, _list: &Vec<ASTNode>, _obj: &Object) -> bool {
fn match_list(&self, _list: &[ASTNode], _obj: &Object) -> bool {
true
}

Expand All @@ -657,12 +657,12 @@ impl DefinedFunction {
fn set_values(&self, patterns: &[ASTNode], args: &[Object], env: &mut Environment) {
for (pattern, arg) in zip(patterns, args) {
match (pattern, arg) {
(ASTNode::ExtensionList(pl), Object::ExtensionList(ExtensionList{ list: al })) => {
(ASTNode::ExtensionList(pl), Object::ExtensionList(ExtensionList { list: al })) => {
match &pl[0] {
ASTNode::Symbol(s) => env.set(&s, al[0].clone()),
ASTNode::Symbol(s) => env.set(s, al[0].clone()),
_ => continue,
}
},
}
_ => continue,
}
}
Expand All @@ -677,7 +677,7 @@ impl DefinedFunction {
if self.matches_all(patterns, args) {
self.set_values(patterns, args, env);
let res = Some(exec(val, env));

env.pop_scope();
return res;
}
Expand Down

0 comments on commit 833ca07

Please sign in to comment.