Use new_list when constructing multiplied list.

This commit is contained in:
Windel Bouwman committed 2018-12-17 12:14:29 +01:00
1 parent bbe333d6c7
commit 950dbd1a77
1 file changed
+1 -6
+1 -6
View File
@@ -252,12 +252,7 @@ fn list_mul(vm: &mut VirtualMachine, args: PyFuncArgs) -> PyResult {
new_elements.extend(elements.clone());
}
Ok(PyObject::new(
PyObjectKind::Sequence {
elements: new_elements,
},
vm.ctx.list_type(),
))
Ok(vm.ctx.new_list(new_elements))
}
pub fn init(context: &PyContext) {