mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-04-24 21:37:57 +00:00
Omit size_hint::cautious when not allocating
This commit is contained in:
@@ -7,6 +7,7 @@ where
|
||||
helper(iter.size_hint())
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "std", feature = "alloc"))]
|
||||
#[inline]
|
||||
pub fn cautious(hint: Option<usize>) -> usize {
|
||||
cmp::min(hint.unwrap_or(0), 4096)
|
||||
|
||||
Reference in New Issue
Block a user