fn common_suffix_len<T: PartialEq>(
    a: &[T],
    a_range: Range<usize>,
    b: &[T],
    b_range: Range<usize>,
) -> usize {
    let mut l = 1;

    while (a_range.end as isize) - (l as isize) >= a_range.start as isize
        && (b_range.end as isize) - (l as isize) >= b_range.start as isize
        && a[a_range.end - l] == b[b_range.end - l]
    {
        l += 1;
    }
    l - 1
}
/// Find the length of the common suffix between the ranges specified for `a` and `b`.
/// The ranges are assumed to be [inclusive, exclusive).
Find the length of the common suffix between the ranges specified for `a` and `b`.
The ranges are assumed to be [inclusive, exclusive).
Find the length of the common suffix between the ranges specified for ` a ` and ` b ` . The ranges are assumed to be [ inclusive exclusive ) .
fn common_suffix_len<T: PartialEq>(
    a: &[T],
    a_range: Range<usize>,
    b: &[T],
    b_range: Range<usize>,
) -> usize {
    let mut l = 1;
    while (a_range.end as isize) - (l as isize) >= a_range.start as isize
        && (b_range.end as isize) - (l as isize) >= b_range.start as isize
        && a[a_range.end - l] == b[b_range.end - l]
    {
        l += 1;
    }
    l - 1
}
fn common_suffix_len < T : PartialEq > ( a : & [ T ] , a_range : Range < usize > , b : & [ T ] , b_range : Range < usize > , ) -> usize { let mut l = 1 ; while ( a_range . end as isize ) - ( l as isize ) >= a_range . start as isize && ( b_range . end as isize ) - ( l as isize ) >= b_range . start as isize && a [ a_range . end - l ] == b [ b_range . end - l ] { l += 1 ; } l - 1 }
Find the length of the common suffix between the ranges specified for `a` and `b`.
Find the length of the common suffix between the ranges specified for ` a ` and ` b ` .
a
&[T]
a_range
Range<usize>
b
&[T]
b_range
Range<usize>
a
&[T]
a_range
Range<usize>
b
&[T]
b_range
Range<usize>