@@ -373,7 +373,7 @@ impl InventoryFile {
373
373
let s = slf. into_super ( ) ;
374
374
let init = PyClassInitializer :: from ( InventoryEntry ( s. 0 . clone ( ) ) ) ;
375
375
let init = init. add_subclass ( Self ( ) ) ;
376
- Ok ( Bound :: new ( py, init) ? )
376
+ Bound :: new ( py, init)
377
377
}
378
378
379
379
fn __repr__ ( slf : PyRef < Self > , py : Python ) -> PyResult < String > {
@@ -486,7 +486,7 @@ impl InventoryDirectory {
486
486
let s = slf. into_super ( ) ;
487
487
let init = PyClassInitializer :: from ( InventoryEntry ( s. 0 . clone ( ) ) ) ;
488
488
let init = init. add_subclass ( Self ( ) ) ;
489
- Ok ( Bound :: new ( py, init) ? )
489
+ Bound :: new ( py, init)
490
490
}
491
491
492
492
#[ getter]
@@ -604,7 +604,7 @@ impl TreeReference {
604
604
let s = slf. into_super ( ) ;
605
605
let init = PyClassInitializer :: from ( InventoryEntry ( s. 0 . clone ( ) ) ) ;
606
606
let init = init. add_subclass ( Self ( ) ) ;
607
- Ok ( Bound :: new ( py, init) ? )
607
+ Bound :: new ( py, init)
608
608
}
609
609
}
610
610
@@ -648,7 +648,7 @@ impl InventoryLink {
648
648
let s = slf. into_super ( ) ;
649
649
let init = PyClassInitializer :: from ( InventoryEntry ( s. 0 . clone ( ) ) ) ;
650
650
let init = init. add_subclass ( Self ( ) ) ;
651
- Ok ( Bound :: new ( py, init) ? )
651
+ Bound :: new ( py, init)
652
652
}
653
653
654
654
#[ getter]
@@ -1120,7 +1120,7 @@ impl Inventory {
1120
1120
reference_revision,
1121
1121
)
1122
1122
. map_err ( |e| inventory_err_to_py_err ( e, py) ) ?;
1123
- Ok ( self . get_entry ( py, file_id) ? )
1123
+ self . get_entry ( py, file_id)
1124
1124
}
1125
1125
1126
1126
#[ getter]
@@ -1340,7 +1340,7 @@ impl Inventory {
1340
1340
old : & Inventory ,
1341
1341
) -> PyResult < Bound < ' py , InventoryDelta > > {
1342
1342
let inventory_delta = self . 0 . make_delta ( & old. 0 ) ;
1343
- Ok ( Bound :: new ( py, InventoryDelta ( inventory_delta) ) ? )
1343
+ Bound :: new ( py, InventoryDelta ( inventory_delta) )
1344
1344
}
1345
1345
1346
1346
fn remove_recursive_id < ' a > (
@@ -1376,10 +1376,10 @@ impl Inventory {
1376
1376
if children. is_none ( ) {
1377
1377
return Err ( NoSuchId :: new_err ( ( py. None ( ) , file_id) ) ) ;
1378
1378
}
1379
- Ok ( children
1379
+ children
1380
1380
. unwrap ( )
1381
1381
. map ( |( _n, e) | Ok ( entry_to_py ( py, e. clone ( ) ) ?. into_any ( ) ) )
1382
- . collect :: < PyResult < Vec < _ > > > ( ) ? )
1382
+ . collect :: < PyResult < Vec < _ > > > ( )
1383
1383
}
1384
1384
1385
1385
fn iter_all_ids < ' a > ( & self , py : Python < ' a > ) -> PyResult < Bound < ' a , PyAny > > {
@@ -1399,10 +1399,10 @@ impl Inventory {
1399
1399
) -> PyResult < Bound < IterEntriesIterator > > {
1400
1400
let recursive = recursive. unwrap_or ( true ) ;
1401
1401
1402
- Ok ( Bound :: new (
1402
+ Bound :: new (
1403
1403
py,
1404
1404
IterEntriesIterator :: new ( py, slf, from_dir, recursive) ?,
1405
- ) ? )
1405
+ )
1406
1406
}
1407
1407
1408
1408
#[ pyo3( signature = ( from_dir=None , specific_file_ids=None ) ) ]
@@ -1412,10 +1412,10 @@ impl Inventory {
1412
1412
from_dir : Option < FileId > ,
1413
1413
specific_file_ids : Option < HashSet < FileId > > ,
1414
1414
) -> PyResult < Bound < IterEntriesByDirIterator > > {
1415
- Ok ( Bound :: new (
1415
+ Bound :: new (
1416
1416
py,
1417
1417
IterEntriesByDirIterator :: new ( py, slf, from_dir, specific_file_ids) ?,
1418
- ) ? )
1418
+ )
1419
1419
}
1420
1420
1421
1421
fn change_root_id ( & mut self , new_root_id : FileId ) -> PyResult < ( ) > {
@@ -1614,8 +1614,8 @@ struct IterEntriesIterator {
1614
1614
}
1615
1615
1616
1616
impl IterEntriesIterator {
1617
- fn new < ' py > (
1618
- py : Python < ' py > ,
1617
+ fn new (
1618
+ py : Python < ' _ > ,
1619
1619
inv : Py < Inventory > ,
1620
1620
mut from_dir : Option < FileId > ,
1621
1621
recursive : bool ,
0 commit comments