You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
pub fn range<K, R>(&self, range: R) -> Iter
where
K: AsRef<[u8]>,
R: RangeBounds<K>;
I am wondering if there is any harm in adding ?Sized to the type parameter K, as follows:
pub fn range<K, R>(&self, range: R) -> Iter
where
K: AsRef<[u8]> + ?Sized,
R: RangeBounds<K>;
I have a type for which I have implemented std::ops::RangeBounds<[u8]>, however I can't use it as a parameter to the range method due to [u8] being an unsized type, even though that shouldn't be an issue as it's only ever used in its borrowed form &[u8].
The text was updated successfully, but these errors were encountered:
The signature of this method is currently:
I am wondering if there is any harm in adding
?Sized
to the type parameterK
, as follows:I have a type for which I have implemented
std::ops::RangeBounds<[u8]>
, however I can't use it as a parameter to therange
method due to[u8]
being an unsized type, even though that shouldn't be an issue as it's only ever used in its borrowed form&[u8]
.The text was updated successfully, but these errors were encountered: