Skip to content

Commit 7ffc086

Browse files
committed
Move and document unwrap at the right place
1 parent efcdf83 commit 7ffc086

1 file changed

Lines changed: 14 additions & 11 deletions

File tree

pineappl_capi/src/lib.rs

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2266,17 +2266,20 @@ pub unsafe extern "C" fn pineappl_grid_evolve(
22662266
})
22672267
.collect();
22682268

2269-
let fk_table = grid.evolve(
2270-
slices,
2271-
order_mask,
2272-
(xi[0], xi[1], xi[2]),
2273-
&AlphasTable {
2274-
ren1: ren1.to_vec(),
2275-
alphas: alphas.to_vec(),
2276-
},
2277-
);
2278-
2279-
Box::new(fk_table.unwrap().into_grid())
2269+
let fk_table = grid
2270+
.evolve(
2271+
slices,
2272+
order_mask,
2273+
(xi[0], xi[1], xi[2]),
2274+
&AlphasTable {
2275+
ren1: ren1.to_vec(),
2276+
alphas: alphas.to_vec(),
2277+
},
2278+
)
2279+
// UNWRAP: error handling in the CAPI is to abort
2280+
.unwrap();
2281+
2282+
Box::new(fk_table.into_grid())
22802283
}
22812284

22822285
/// Optimize the size of this FK-table by removing heavy quark flavors assumed to be zero.

0 commit comments

Comments
 (0)