Use #[inline(always)] only when relatively certain.

This commit is contained in:
Stephen Chung
2021-10-21 17:26:43 +08:00
parent 313999b0ac
commit 9c16d90de9
21 changed files with 129 additions and 122 deletions

View File

@@ -251,7 +251,7 @@ impl Iterator for CharsStream {
}
}
#[inline(always)]
#[inline]
fn size_hint(&self) -> (usize, Option<usize>) {
let remaining = self.0.len() - self.1;
(remaining, Some(remaining))
@@ -261,7 +261,7 @@ impl Iterator for CharsStream {
impl FusedIterator for CharsStream {}
impl ExactSizeIterator for CharsStream {
#[inline(always)]
#[inline]
fn len(&self) -> usize {
self.0.len() - self.1
}