Skip to content

Commit

Permalink
spl: Add static lifetime for idl-build discriminator constants (#…
Browse files Browse the repository at this point in the history
…3129)

Co-authored-by: acheron <[email protected]>
  • Loading branch information
deanmlittle and acheroncrypto authored Jul 28, 2024
1 parent a4b751c commit 200f0fb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion spl/src/governance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ macro_rules! vote_weight_record {

#[cfg(feature = "idl-build")]
impl anchor_lang::Discriminator for VoterWeightRecord {
const DISCRIMINATOR: &[u8] = &[];
const DISCRIMINATOR: &'static [u8] = &[];
}
};
}
2 changes: 1 addition & 1 deletion spl/src/idl_build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ macro_rules! impl_idl_build {
//
// TODO: Find a better way to handle discriminators of wrapped external accounts.
impl anchor_lang::Discriminator for $ty {
const DISCRIMINATOR: &[u8] = &[];
const DISCRIMINATOR: &'static [u8] = &[];
}
};
}
Expand Down

0 comments on commit 200f0fb

Please sign in to comment.