From cd90965c1fc2c19853b31c8a3c663f9613a6623b Mon Sep 17 00:00:00 2001 From: Riccardo Busetti Date: Mon, 26 Aug 2024 13:53:33 +0200 Subject: [PATCH] Rename --- relay-config/src/config.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/relay-config/src/config.rs b/relay-config/src/config.rs index cb940639e7..53406d0def 100644 --- a/relay-config/src/config.rs +++ b/relay-config/src/config.rs @@ -365,6 +365,13 @@ pub enum RelayDeployment { Canary, } +impl RelayDeployment { + /// Returns `true` if the [`RelayDeployment`] is of type [`RelayDeployment::Canary`]. + pub fn is_canary(&self) -> bool { + matches!(self, RelayDeployment::Canary) + } +} + impl fmt::Display for RelayDeployment { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { match self {