Remove extern crate (#5922)

* Remove extern crate
This commit is contained in:
Michael Sproul
2024-06-18 01:05:21 +10:00
committed by GitHub
parent 44c03d5d17
commit 21f3a191c5
33 changed files with 23 additions and 41 deletions

View File

@@ -1,5 +1,3 @@
extern crate slog;
mod compute_light_client_updates;
pub mod config;
mod metrics;

View File

@@ -1,6 +1,3 @@
#[macro_use]
extern crate lazy_static;
mod block_cache;
mod deposit_cache;
mod inner;

View File

@@ -1,5 +1,7 @@
pub use lighthouse_metrics::*;
use lazy_static::lazy_static;
lazy_static! {
/*
* Eth1 blocks

View File

@@ -1,5 +1,3 @@
extern crate alloy_consensus;
extern crate alloy_rlp;
use alloy_consensus::TxEnvelope;
use alloy_rlp::Decodable;
use types::{EthSpec, ExecutionPayloadRef, Hash256, Unsigned, VersionedHash};

View File

@@ -2,9 +2,6 @@
/// all required libp2p functionality.
///
/// This crate builds and manages the libp2p services required by the beacon node.
#[macro_use]
extern crate lazy_static;
mod config;
pub mod service;

View File

@@ -1,5 +1,7 @@
pub use lighthouse_metrics::*;
use lazy_static::lazy_static;
lazy_static! {
pub static ref NAT_OPEN: Result<IntGaugeVec> = try_create_int_gauge_vec(
"nat_open",

View File

@@ -6,6 +6,7 @@
//!
//! The scoring algorithms are currently experimental.
use crate::service::gossipsub_scoring_parameters::GREYLIST_THRESHOLD as GOSSIPSUB_GREYLIST_THRESHOLD;
use lazy_static::lazy_static;
use serde::Serialize;
use std::time::Instant;
use strum::AsRefStr;

View File

@@ -3,6 +3,7 @@ use crate::rpc::codec::{base::BaseInboundCodec, ssz_snappy::SSZSnappyInboundCode
use futures::future::BoxFuture;
use futures::prelude::{AsyncRead, AsyncWrite};
use futures::{FutureExt, StreamExt};
use lazy_static::lazy_static;
use libp2p::core::{InboundUpgrade, UpgradeInfo};
use ssz::Encode;
use ssz_types::VariableList;

View File

@@ -1,6 +1,3 @@
#[macro_use]
extern crate lazy_static;
/// This crate provides the network server for Lighthouse.
pub mod error;
#[allow(clippy::mutable_key_type)] // PeerId in hashmaps are no longer permitted by clippy

View File

@@ -5,6 +5,7 @@ use beacon_chain::{
sync_committee_verification::Error as SyncCommitteeError,
};
use fnv::FnvHashMap;
use lazy_static::lazy_static;
pub use lighthouse_metrics::*;
use lighthouse_network::{
peer_manager::peerdb::client::ClientKind, types::GossipKind, GossipTopic, Gossipsub,

View File

@@ -1,5 +1,3 @@
extern crate clap;
mod cli;
mod config;

View File

@@ -7,9 +7,6 @@
//!
//! Provides a simple API for storing/retrieving all types that sometimes needs type-hints. See
//! tests for implementation examples.
#[macro_use]
extern crate lazy_static;
mod chunk_writer;
pub mod chunked_iter;
pub mod chunked_vector;

View File

@@ -1,6 +1,7 @@
pub use lighthouse_metrics::{set_gauge, try_create_int_gauge, *};
use directory::size_of_dir;
use lazy_static::lazy_static;
use std::path::Path;
lazy_static! {