Skip to content

Commit 4cb7f02

Browse files
committed
Remove unnecessary cast to pyobject in kwarg construction.
1 parent 14d3aab commit 4cb7f02

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

vm/src/vm.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -451,11 +451,11 @@ impl VirtualMachine {
451451
// Do we support `**kwargs` ?
452452
let kwargs = match code_object.varkeywords {
453453
bytecode::Varargs::Named(ref kwargs_name) => {
454-
let d = self.ctx.new_dict().into_object();
455-
locals.set_item(&self.ctx, kwargs_name, d.clone());
454+
let d = self.ctx.new_dict();
455+
locals.set_item(&self.ctx, kwargs_name, d.as_object().clone());
456456
Some(d)
457457
}
458-
bytecode::Varargs::Unnamed => Some(self.ctx.new_dict().into_object()),
458+
bytecode::Varargs::Unnamed => Some(self.ctx.new_dict()),
459459
bytecode::Varargs::None => None,
460460
};
461461

0 commit comments

Comments
 (0)