Omit size_hint::cautious when not allocating
This commit is contained in:
parent
38edb473de
commit
74ca06662e
@ -7,6 +7,7 @@ where
|
|||||||
helper(iter.size_hint())
|
helper(iter.size_hint())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(any(feature = "std", feature = "alloc"))]
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn cautious(hint: Option<usize>) -> usize {
|
pub fn cautious(hint: Option<usize>) -> usize {
|
||||||
cmp::min(hint.unwrap_or(0), 4096)
|
cmp::min(hint.unwrap_or(0), 4096)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user