fn find_compatible_buffer<B>(vbufs: &[VertexBuffer<B>], format: &VertexFormat<'_>) -> Option<usize>
where
    B: gfx_hal::Backend,
{
    debug_assert!(is_slice_sorted_by_key(&*format.attributes, |a| a.offset));
    for (i, vbuf) in vbufs.iter().enumerate() {
        debug_assert!(is_slice_sorted_by_key(&*vbuf.format.attributes, |a| a.offset));
        if is_compatible(&vbuf.format, format) {
            return Some(i);
        }
    }
    None
}
/// Helper function to find buffer with compatible format.
Helper function to find buffer with compatible format.
Helper function to find buffer with compatible format .
fn find_compatible_buffer<B>(vbufs: &[VertexBuffer<B>], format: &VertexFormat<'_>) -> Option<usize>
where
    B: gfx_hal::Backend,
{
    debug_assert!(is_slice_sorted_by_key(&*format.attributes, |a| a.offset));
    for (i, vbuf) in vbufs.iter().enumerate() {
        debug_assert!(is_slice_sorted_by_key(&*vbuf.format.attributes, |a| a.offset));
        if is_compatible(&vbuf.format, format) {
            return Some(i);
        }
    }
    None
}
fn find_compatible_buffer < B > ( vbufs : & [ VertexBuffer < B > ] , format : & VertexFormat < ' _ > ) -> Option < usize > where B : gfx_hal :: Backend , { debug_assert ! ( is_slice_sorted_by_key ( format attributes a a offset ) ) ; for ( i , vbuf ) in vbufs . iter ( ) . enumerate ( ) { debug_assert ! ( is_slice_sorted_by_key ( vbuf format attributes a a offset ) ) ; if is_compatible ( & vbuf . format , format ) { return Some ( i ) ; } } None }
Helper function to find buffer with compatible format.
Helper function to find buffer with compatible format .
vbufs
&[VertexBuffer<B>]
format
&VertexFormat<'_>
vbufs
&[VertexBuffer<B>]
format
&VertexFormat<'_>