From 82130b2ed5cb5362ffe1f8193614d67f8663f27d Mon Sep 17 00:00:00 2001 From: Gleb Smirnov Date: Thu, 26 Feb 2026 08:59:39 +0300 Subject: [PATCH] fix: put non-ethexe error variants under `#[cfg(...)]` This commit adds `#[cfg(not(feature = "ethexe"))]` attribute for variants of `gstd::UsageError` that cannot occur with `ethexe` feature. --- gstd/src/common/errors.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gstd/src/common/errors.rs b/gstd/src/common/errors.rs index d341731ec4c..354b5b74011 100644 --- a/gstd/src/common/errors.rs +++ b/gstd/src/common/errors.rs @@ -182,6 +182,7 @@ pub enum UsageError { /// This error occurs when providing zero gas amount to system gas reserving /// function (see /// [`Config::set_system_reserve`](crate::Config::set_system_reserve)). + #[cfg(not(feature = "ethexe"))] #[error("System reservation amount can not be zero in config")] ZeroSystemReservationAmount, /// This error occurs when providing zero duration to mutex lock function @@ -190,6 +191,7 @@ pub enum UsageError { /// This error occurs when handle_reply is called without (or with zero) /// reply deposit /// (see [`MessageFuture::handle_reply`](crate::msg::MessageFuture::handle_reply)). + #[cfg(not(feature = "ethexe"))] #[error("Reply deposit can not be zero when setting reply hook")] ZeroReplyDeposit, }