diff options
Diffstat (limited to 'src/eval')
| -rw-r--r-- | src/eval/args.rs | 2 | ||||
| -rw-r--r-- | src/eval/mod.rs | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/eval/args.rs b/src/eval/args.rs index 66ca4a85..aadd7d54 100644 --- a/src/eval/args.rs +++ b/src/eval/args.rs @@ -69,7 +69,7 @@ impl Args { let vec = self.items.to_vec(); let (left, right) = vec.split_at(n); self.items = right.into(); - return Ok(left.into()); + Ok(left.into()) } /// Consume and cast the first positional argument. diff --git a/src/eval/mod.rs b/src/eval/mod.rs index 1b3c6ea3..68d8148f 100644 --- a/src/eval/mod.rs +++ b/src/eval/mod.rs @@ -1203,7 +1203,7 @@ impl ast::Pattern { return None; }; if let Some(ident) = ident { - vm.define(ident.clone(), sink.clone()); + vm.define(ident.clone(), sink); } i += sink_size as i64; Some(()) @@ -1217,7 +1217,7 @@ impl ast::Pattern { } } } - if i < value.len() as i64 { + if i < value.len() { bail!(self.span(), "too many elements to destructure"); } } |
