From ee32e7ad1ce26d4eebe601344e0343cfb9c8f9bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Barv=C3=AD=C5=99?= Date: Sun, 16 Apr 2023 11:10:35 +0200 Subject: Clippy fixes (#581) --- src/eval/args.rs | 2 +- src/eval/mod.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/eval') 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"); } } -- cgit v1.2.3