fn checked_volume_helper(sizes: GridVector) -> Result<usize, ()> {
        let mut volume: usize = 1;
        for i in 0..3 {
            volume = volume
                .checked_mul(usize::try_from(sizes[i]).map_err(|_| ())?)
                .ok_or(())?;
        }
        Ok(volume)
    }
/// Compute volume with checked arithmetic. In a function solely for the convenience
/// of the `?` operator without which this is even worse.
Compute volume with checked arithmetic. In a function solely for the convenience
of the `?` operator without which this is even worse.
Compute volume with checked arithmetic . In a function solely for the convenience of the ` ? ` operator without which this is even worse .
fn checked_volume_helper(sizes: GridVector) -> Result<usize, ()> {
        let mut volume: usize = 1;
        for i in 0..3 {
            volume = volume
                .checked_mul(usize::try_from(sizes[i]).map_err(|_| ())?)
                .ok_or(())?;
        }
        Ok(volume)
    }
fn checked_volume_helper ( sizes : GridVector ) -> Result < usize , ( ) > { let mut volume : usize = 1 ; for i in 0 .. 3 { volume = volume . checked_mul ( usize :: try_from ( sizes [ i ] ) . map_err ( | _ | ( ) ) ? ) . ok_or ( ( ) ) ? ; } Ok ( volume ) }
Compute volume with checked arithmetic.
Compute volume with checked arithmetic .
sizes
GridVector