From 002893a646489298a0a8c1ab59008cd402f1ed0b Mon Sep 17 00:00:00 2001 From: webmsgr Date: Sat, 30 Dec 2023 02:55:44 -0800 Subject: [PATCH] Add missing non_exhaustive enum variant constructors to SlashArgError --- src/slash_argument/slash_macro.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/slash_argument/slash_macro.rs b/src/slash_argument/slash_macro.rs index e4b0003a06bd..0bd5ebfd51c9 100644 --- a/src/slash_argument/slash_macro.rs +++ b/src/slash_argument/slash_macro.rs @@ -45,6 +45,14 @@ impl SlashArgError { Self::CommandStructureMismatch { description } } + pub fn new_parse(error: Box, input: String) -> Self { + Self::Parse { error, input } + } + + pub fn new_invalid(description: &'static str) -> Self { + Self::Invalid(description) + } + pub fn to_framework_error( self, ctx: crate::ApplicationContext<'_, U, E>,