fn check_dimensions_match<S: Shapelike, T: Shapelike>(
    s1: &S,
    s2: &T,
) -> Result<(), ShapelikeError> {
    let d1 = s1.get_dimension();
    let d2 = s2.get_dimension();

    if d1 != d2 {
        Err(ShapelikeError::UnmatchedDimensions(d1, d2))
    } else {
        Ok(())
    }
}
/// Helper function to check that two shapelike's have the same dimension.
Helper function to check that two shapelike's have the same dimension.
Helper function to check that two shapelike ' s have the same dimension .
fn check_dimensions_match<S: Shapelike, T: Shapelike>(
    s1: &S,
    s2: &T,
) -> Result<(), ShapelikeError> {
    let d1 = s1.get_dimension();
    let d2 = s2.get_dimension();
    if d1 != d2 {
        Err(ShapelikeError::UnmatchedDimensions(d1, d2))
    } else {
        Ok(())
    }
}
fn check_dimensions_match < S : Shapelike , T : Shapelike > ( s1 : & S , s2 : & T , ) -> Result < ( ) , ShapelikeError > { let d1 = s1 . get_dimension ( ) ; let d2 = s2 . get_dimension ( ) ; if d1 != d2 { Err ( ShapelikeError :: UnmatchedDimensions ( d1 , d2 ) ) } else { Ok ( ( ) ) } }
Helper function to check that two shapelike's have the same dimension.
Helper function to check that two shapelike ' s have the same dimension .
s1
&S
s2
&T
s1
&S
s2
&T