File tree 2 files changed +3
-11
lines changed 2 files changed +3
-11
lines changed Original file line number Diff line number Diff line change @@ -322,8 +322,6 @@ def test_ixor(self):
322
322
else :
323
323
self .assertNotIn (c , self .s )
324
324
325
- # TODO: RUSTPYTHON
326
- @unittest .expectedFailure
327
325
def test_inplace_on_self (self ):
328
326
t = self .s .copy ()
329
327
t |= t
Original file line number Diff line number Diff line change @@ -391,16 +391,10 @@ impl PySetInner {
391
391
others : impl std:: iter:: Iterator < Item = ArgIterable > ,
392
392
vm : & VirtualMachine ,
393
393
) -> PyResult < ( ) > {
394
- let mut temp_inner = self . copy ( ) ;
394
+ let temp_inner = self . fold_op ( others , PySetInner :: intersection , vm ) ? ;
395
395
self . clear ( ) ;
396
- for iterable in others {
397
- for item in iterable. iter ( vm) ? {
398
- let obj = item?;
399
- if temp_inner. contains ( & obj, vm) ? {
400
- self . add ( obj, vm) ?;
401
- }
402
- }
403
- temp_inner = self . copy ( )
396
+ for obj in temp_inner. elements ( ) {
397
+ self . add ( obj, vm) ?;
404
398
}
405
399
Ok ( ( ) )
406
400
}
You can’t perform that action at this time.
0 commit comments