Should I add as_slice method to BinaryHeap?

There is BinaryHeap::into_vec, but it consumes the value. I wonder if there is API design limitation that should be taken into account. Implementation-wise, the inner buffer is just a Vec, so it is trivial to expose as_slice from it.

3 Likes