Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions stacks-common/src/util/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ macro_rules! define_named_enum {
$($Variant),*,
}
impl $Name {
pub const ALL: &[$Name] = &[$($Name::$Variant),*];
pub const ALL_NAMES: &[&str] = &[$($VarName),*];
pub const ALL: &'static [$Name] = &[$($Name::$Variant),*];
pub const ALL_NAMES: &'static [&'static str] = &[$($VarName),*];

pub fn lookup_by_name(name: &str) -> Option<Self> {
match name {
Expand Down Expand Up @@ -113,8 +113,8 @@ macro_rules! define_versioned_named_enum_internal {
}

impl $Name {
pub const ALL: &[$Name] = &[$($Name::$Variant),*];
pub const ALL_NAMES: &[&str] = &[$($VarName),*];
pub const ALL: &'static [$Name] = &[$($Name::$Variant),*];
pub const ALL_NAMES: &'static [&'static str] = &[$($VarName),*];

pub fn lookup_by_name(name: &str) -> Option<Self> {
match name {
Expand Down
22 changes: 11 additions & 11 deletions stackslib/src/chainstate/burn/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -183,17 +183,17 @@ impl SortitionHash {
}

impl Opcodes {
const HTTP_BLOCK_COMMIT: &str = "block_commit";
const HTTP_KEY_REGISTER: &str = "key_register";
const HTTP_BURN_SUPPORT: &str = "burn_support";
const HTTP_STACK_STX: &str = "stack_stx";
const HTTP_PRE_STX: &str = "pre_stx";
const HTTP_TRANSFER_STX: &str = "transfer_stx";
const HTTP_DELEGATE_STX: &str = "delegate_stx";
const HTTP_PEG_IN: &str = "peg_in";
const HTTP_PEG_OUT_REQUEST: &str = "peg_out_request";
const HTTP_PEG_OUT_FULFILL: &str = "peg_out_fulfill";
const HTTP_VOTE_FOR_AGGREGATE_KEY: &str = "vote_for_aggregate_key";
const HTTP_BLOCK_COMMIT: &'static str = "block_commit";
const HTTP_KEY_REGISTER: &'static str = "key_register";
const HTTP_BURN_SUPPORT: &'static str = "burn_support";
const HTTP_STACK_STX: &'static str = "stack_stx";
const HTTP_PRE_STX: &'static str = "pre_stx";
const HTTP_TRANSFER_STX: &'static str = "transfer_stx";
const HTTP_DELEGATE_STX: &'static str = "delegate_stx";
const HTTP_PEG_IN: &'static str = "peg_in";
const HTTP_PEG_OUT_REQUEST: &'static str = "peg_out_request";
const HTTP_PEG_OUT_FULFILL: &'static str = "peg_out_fulfill";
const HTTP_VOTE_FOR_AGGREGATE_KEY: &'static str = "vote_for_aggregate_key";

pub fn to_http_str(&self) -> &'static str {
match self {
Expand Down
4 changes: 2 additions & 2 deletions stackslib/src/net/api/getstackers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ pub enum GetStackersErrors {
}

impl GetStackersErrors {
pub const NOT_AVAILABLE_ERR_TYPE: &str = "not_available_try_again";
pub const OTHER_ERR_TYPE: &str = "other";
pub const NOT_AVAILABLE_ERR_TYPE: &'static str = "not_available_try_again";
pub const OTHER_ERR_TYPE: &'static str = "other";

pub fn error_type_string(&self) -> &'static str {
match self {
Expand Down