Skip to content

Commit 74f261a

Browse files
committed
Fix Rust 1.44 clippy warnings
1 parent 0fb79e1 commit 74f261a

File tree

4 files changed

+3
-3
lines changed

4 files changed

+3
-3
lines changed

compiler/src/compile.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -591,7 +591,7 @@ impl<O: OutputStream> Compiler<O> {
591591
{
592592
return Err(self.error_loc(
593593
CompileErrorType::AsyncReturnValue,
594-
statement.location.clone(),
594+
statement.location,
595595
));
596596
}
597597
self.compile_expression(v)?;

vm/src/obj/objtype.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,7 @@ impl PyClassRef {
274274
// Search the bases for the proper metatype to deal with this:
275275
let winner = calculate_meta_class(metatype.clone(), &bases, vm)?;
276276
let metatype = if !winner.is(&metatype) {
277+
#[allow(clippy::redundant_clone)] // false positive
277278
if let Some(ref tp_new) = winner.clone().slots.read().unwrap().new {
278279
// Pass it to the winner
279280

vm/src/pyobject.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -599,7 +599,7 @@ impl PyContext {
599599
bytecode::Constant::Complex { ref value } => self.new_complex(*value),
600600
bytecode::Constant::String { ref value } => self.new_str(value.clone()),
601601
bytecode::Constant::Bytes { ref value } => self.new_bytes(value.clone()),
602-
bytecode::Constant::Boolean { ref value } => self.new_bool(value.clone()),
602+
bytecode::Constant::Boolean { value } => self.new_bool(value),
603603
bytecode::Constant::Code { ref code } => {
604604
self.new_code_object(*code.clone()).into_object()
605605
}

vm/src/scope.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ impl Scope {
3939
) -> Scope {
4040
if !globals.contains_key("__builtins__", vm) {
4141
globals
42-
.clone()
4342
.set_item("__builtins__", vm.builtins.clone(), vm)
4443
.unwrap();
4544
}

0 commit comments

Comments
 (0)