Optimize functions calling.

This commit is contained in:
Stephen Chung
2022-09-27 23:04:22 +08:00
parent b141e8d0e1
commit fde8483f54
7 changed files with 64 additions and 72 deletions

View File

@@ -87,7 +87,7 @@ impl DerefMut for Namespace {
}
impl From<Vec<Ident>> for Namespace {
#[inline(always)]
#[inline]
fn from(mut path: Vec<Ident>) -> Self {
path.shrink_to_fit();
Self {
@@ -98,7 +98,7 @@ impl From<Vec<Ident>> for Namespace {
}
impl From<StaticVec<Ident>> for Namespace {
#[inline(always)]
#[inline]
fn from(mut path: StaticVec<Ident>) -> Self {
path.shrink_to_fit();
Self { index: None, path }