From 43a6a80bd1311e84b86e815ea763c5b9f2c01f99 Mon Sep 17 00:00:00 2001 From: Simon Gardling Date: Fri, 8 Apr 2022 09:15:53 -0400 Subject: [PATCH] fix HintEnum is_none and is_some --- src/suggestions.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/suggestions.rs b/src/suggestions.rs index 085ca25..2efd91f 100644 --- a/src/suggestions.rs +++ b/src/suggestions.rs @@ -67,9 +67,10 @@ impl<'a> std::fmt::Display for HintEnum<'a> { } impl<'a> HintEnum<'a> { - pub fn is_some(&self) -> bool { !matches!(self, HintEnum::None) } + pub fn is_none(&self) -> bool { matches!(self, HintEnum::None) } - pub fn is_none(&self) -> bool { !self.is_some() } + #[allow(dead_code)] + pub fn is_some(&self) -> bool { !self.is_none() } } include!(concat!(env!("OUT_DIR"), "/codegen.rs"));