Fix set intersection_update

This commit is contained in:
Aviv Palivoda committed 2020-02-22 12:59:48 +02:00
1 parent 84250294b0
commit 3db197c4b1
2 files changed
+2 -2

No files matched your search

-1
View File
@@ -512,7 +512,6 @@ class TestSet(TestJointOps, unittest.TestCase):
for c in (self.word + self.otherword):
self.assertIn(c, self.s)
@unittest.skip("TODO: RUSTPYTHON")
def test_intersection_update(self):
retval = self.s.intersection_update(self.otherword)
self.assertEqual(retval, None)
+2 -1
View File
@@ -298,7 +298,7 @@ impl PySetInner {
others: Args<PyIterable>,
vm: &VirtualMachine,
) -> PyResult<()> {
let temp_inner = self.copy();
let mut temp_inner = self.copy();
self.clear();
for iterable in others {
for item in iterable.iter(vm)? {
@@ -307,6 +307,7 @@ impl PySetInner {
self.add(&obj, vm)?;
}
}
temp_inner = self.copy()
}
Ok(())
}