VecDeque: binary search fns

Today I had to write an extension trait for VecDeque adding the binary search functions that slice (and via deref Vec) has (binary_search() et al.).

Would that be worthy of adding to the stdlib?

2 Likes

I think it sounds reasonable. Should be able to do it on VecDeque::as_slices so it does one comparison then delegates to the slice version.

1 Like

Yeah, that's exactly how my extension works currently :slight_smile:

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.