mirror of
https://github.com/RustPython/RustPython.git
synced 2026-10-29 03:04:38 +08:00
Fix set intersection_update
This commit is contained in:
1 parent
84250294b0
commit
3db197c4b1
2 files changed
+2
-2
No files matched your search
@@ -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)
|
||||
|
||||
@@ -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(())
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user