From f205091d0a9f4081f5eae336d74a2ec5ec5018ff Mon Sep 17 00:00:00 2001 From: Stephen Chung Date: Mon, 10 Jan 2022 22:51:24 +0800 Subject: [PATCH] Inline traits impl. --- src/eval/global_state.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/eval/global_state.rs b/src/eval/global_state.rs index 5378eba9..aaa8e50a 100644 --- a/src/eval/global_state.rs +++ b/src/eval/global_state.rs @@ -245,6 +245,7 @@ impl IntoIterator for GlobalRuntimeState { } impl, M: Into>> FromIterator<(K, M)> for GlobalRuntimeState { + #[inline] fn from_iter>(iter: T) -> Self { let mut lib = Self::new(); lib.extend(iter); @@ -253,6 +254,7 @@ impl, M: Into>> FromIterator<(K, M)> for Glob } impl, M: Into>> Extend<(K, M)> for GlobalRuntimeState { + #[inline] fn extend>(&mut self, iter: T) { iter.into_iter().for_each(|(k, m)| { self.keys.push(k.into()); @@ -262,6 +264,7 @@ impl, M: Into>> Extend<(K, M)> for GlobalRunt } impl fmt::Debug for GlobalRuntimeState { + #[inline] fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { let mut f = f.debug_struct("GlobalRuntimeState");