Skip to content

Commit

Permalink
Fix const validity
Browse files Browse the repository at this point in the history
  • Loading branch information
BrianBland committed Jun 3, 2024
1 parent b0f9ca3 commit 8f0ee33
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion crates/net/discv5/src/network_stack_id.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@ impl NetworkStackId {
/// ENR fork ID kv-pair key, for an Optimism CL node.
pub const OPSTACK: &'static [u8] = b"opstack";

#[allow(clippy::missing_const_for_fn)]
/// Returns the [`NetworkStackId`] that matches the given [`ChainSpec`].
pub const fn id(chain: &ChainSpec) -> Option<&'static [u8]> {
pub fn id(chain: &ChainSpec) -> Option<&'static [u8]> {
if chain.is_optimism() {
return Some(Self::OPEL)
} else if chain.is_eth() {
Expand Down

0 comments on commit 8f0ee33

Please sign in to comment.