From 50ef1d17f9ec1d55c96b256ad8114a633fc65d85 Mon Sep 17 00:00:00 2001 From: Simon Gardling Date: Mon, 16 May 2022 13:32:11 -0400 Subject: [PATCH] don't use dyn_iter for newtons_method_helper --- parsing/src/suggestions.rs | 3 +++ src/function_entry.rs | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/parsing/src/suggestions.rs b/parsing/src/suggestions.rs index 0bd4825..e946918 100644 --- a/parsing/src/suggestions.rs +++ b/parsing/src/suggestions.rs @@ -242,11 +242,14 @@ impl<'a> std::fmt::Debug for Hint<'a> { } impl<'a> Hint<'a> { + #[inline] pub const fn is_none(&self) -> bool { matches!(&self, &Hint::None) } + #[inline] #[allow(dead_code)] pub const fn is_some(&self) -> bool { !self.is_none() } + #[inline] #[allow(dead_code)] pub const fn is_single(&self) -> bool { matches!(&self, &Hint::Single(_)) } diff --git a/src/function_entry.rs b/src/function_entry.rs index 8844d9f..394925c 100644 --- a/src/function_entry.rs +++ b/src/function_entry.rs @@ -262,7 +262,8 @@ impl FunctionEntry { _ => unreachable!(), }; - dyn_iter(&newtons_method_output) + newtons_method_output + .iter() .map(|x| Value::new(*x, self.function.get(*x))) .collect() }