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

@@ -76,7 +76,7 @@ impl ModuleResolversCollection {
self.0.remove(index)
}
/// Get an iterator of all the [module resolvers][ModuleResolver].
#[inline(always)]
#[inline]
pub fn iter(&self) -> impl Iterator<Item = &dyn ModuleResolver> {
self.0.iter().map(|v| v.as_ref())
}
@@ -100,7 +100,7 @@ impl ModuleResolversCollection {
}
/// Add another [`ModuleResolversCollection`] to the end of this collection.
/// The other [`ModuleResolversCollection`] is consumed.
#[inline(always)]
#[inline]
pub fn append(&mut self, other: Self) -> &mut Self {
self.0.extend(other.0.into_iter());
self