From f946d912832fbaa1d9deb81aa43c86de08ac3564 Mon Sep 17 00:00:00 2001 From: Ran Miller Date: Wed, 31 Jul 2024 12:15:37 +0800 Subject: [PATCH] refactor(servers): remove numerical representation of ErrorSeverity --- src/servers/src/postgres/types/error.rs | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/servers/src/postgres/types/error.rs b/src/servers/src/postgres/types/error.rs index 5f7a47d66eb0..928c5454ce27 100644 --- a/src/servers/src/postgres/types/error.rs +++ b/src/servers/src/postgres/types/error.rs @@ -21,20 +21,19 @@ use strum::{AsRefStr, Display, EnumIter, EnumMessage}; #[allow(dead_code)] enum ErrorSeverity { #[strum(serialize = "INFO")] - Info = 0, + Info, #[strum(serialize = "DEBUG")] - Debug = 1, + Debug, #[strum(serialize = "NOTICE")] - Notice = 2, + Notice, #[strum(serialize = "WARNING")] - Warning = 3, - + Warning, #[strum(serialize = "ERROR")] - Error = 10, + Error, #[strum(serialize = "FATAL")] - Fatal = 11, + Fatal, #[strum(serialize = "PANIC")] - Panic = 12, + Panic, } // refer to: https://www.postgresql.org/docs/16/errcodes-appendix.html