Mark size_hint::cautious as inline.

This commit is contained in:
Kyle Huey 2017-12-01 00:20:05 -08:00
parent 8c34e0940f
commit 4a0c4e0c25

View File

@ -198,6 +198,7 @@ pub mod size_hint {
helper(iter.size_hint())
}
#[inline]
pub fn cautious(hint: Option<usize>) -> usize {
cmp::min(hint.unwrap_or(0), 4096)
}