From c955487c5f393682ddedfc46d61fa3f529d0c33e Mon Sep 17 00:00:00 2001 From: Nikita Sivukhin Date: Tue, 30 Sep 2025 14:52:59 +0400 Subject: [PATCH] remove unnecessary enum variant --- core/parameters.rs | 3 --- 1 file changed, 3 deletions(-) diff --git a/core/parameters.rs b/core/parameters.rs index a6f3d31b5..6abe5478c 100644 --- a/core/parameters.rs +++ b/core/parameters.rs @@ -2,7 +2,6 @@ use std::num::NonZero; #[derive(Clone, Debug)] pub enum Parameter { - Anonymous(NonZero), Indexed(NonZero), Named(String, NonZero), } @@ -16,7 +15,6 @@ impl PartialEq for Parameter { impl Parameter { pub fn index(&self) -> NonZero { match self { - Parameter::Anonymous(index) => *index, Parameter::Indexed(index) => *index, Parameter::Named(_, index) => *index, } @@ -51,7 +49,6 @@ impl Parameters { pub fn name(&self, index: NonZero) -> Option { self.list.iter().find_map(|p| match p { - Parameter::Anonymous(i) if *i == index => Some("?".to_string()), Parameter::Indexed(i) if *i == index => Some(format!("?{i}")), Parameter::Named(name, i) if *i == index => Some(name.to_owned()), _ => None,