Skip to content

Commit

Permalink
Address compiler warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
ligustah committed May 6, 2024
1 parent 8554250 commit 7088ed7
Show file tree
Hide file tree
Showing 12 changed files with 7 additions and 44 deletions.
2 changes: 1 addition & 1 deletion src/api/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ impl AppState {
}
}

pub fn router_with_defaults(config: &Config) -> Router<AppState> {
pub fn router_with_defaults(_config: &Config) -> Router<AppState> {
Router::new()
.route("/health", get(routes::health))
.route("/list-all", get(routes::list_all))
Expand Down
3 changes: 0 additions & 3 deletions src/api/routes.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
use std::path::Display;

use axum::extract::{Path, Query, State};
use axum::http::StatusCode;
use axum::Json;
use const_hex::ToHexExt;
use itertools::Itertools;
use libp2p::autonat::NatStatus;
use serde::Serialize;
use sqlx::{Executor, Row};
Expand Down
1 change: 0 additions & 1 deletion src/chain_list.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
use alloy::network::Network;
use alloy::providers::{ProviderBuilder, RootProvider};
use alloy::pubsub::PubSubFrontend;
use alloy::rpc::client::WsConnect;
Expand Down
1 change: 0 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ use mintpool::rules::RulesEngine;
use mintpool::run::{start_p2p_services, start_watch_chain};
use mintpool::stdin::watch_stdin;
use tokio::signal::unix::{signal, SignalKind};
use tracing_subscriber::EnvFilter;

#[tokio::main]
async fn main() -> eyre::Result<()> {
Expand Down
7 changes: 3 additions & 4 deletions src/p2p.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
use std::borrow::Cow;
use std::collections::HashMap;
use std::hash::Hasher;
use std::time::Duration;

use eyre::WrapErr;
Expand Down Expand Up @@ -34,8 +32,8 @@ use crate::multi_ticker::MultiTicker;
use crate::multiaddr_ext::MultiaddrExt;
use crate::storage::QueryOptions;
use crate::types::{
claims_topic_hashes, InclusionClaim, MintpoolNodeInfo, PeerInclusionClaim, Premint,
PremintName, PremintTypes,
claims_topic_hashes, InclusionClaim, MintpoolNodeInfo, PeerInclusionClaim, PremintName,
PremintTypes,
};

#[derive(NetworkBehaviour)]
Expand Down Expand Up @@ -853,6 +851,7 @@ impl SwarmController {
Ok(())
}

#[allow(dead_code)]
fn gossip_unsubscribe(&mut self, topic: &IdentTopic) -> eyre::Result<()> {
let b = self.swarm.behaviour_mut();

Expand Down
23 changes: 0 additions & 23 deletions src/premints/metadata.rs

This file was deleted.

1 change: 0 additions & 1 deletion src/premints/mod.rs
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
pub mod metadata;
pub mod zora_premint;
1 change: 0 additions & 1 deletion src/premints/zora_premint/erc20v1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ use crate::{implement_zora_premint_traits, typed_rule};
use alloy::primitives::Address;

use crate::premints::zora_premint::contract::IZoraPremintERC20V1;
use crate::premints::zora_premint::contract::IZoraPremintV2::IZoraPremintV2Errors;

use crate::rules::Rule;
use crate::storage::Reader;
Expand Down
5 changes: 0 additions & 5 deletions src/premints/zora_premint/rules.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
use crate::premints::zora_premint::v2::V2;
use crate::rules::Rule;
use crate::storage::Reader;
use crate::typed_rule;
use crate::types::PremintTypes;
#[macro_export]
macro_rules! zora_premint_rules {
($namespace:tt, $typ:ty, $version:literal) => {
Expand Down
2 changes: 1 addition & 1 deletion src/rules.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use serde::{Serialize, Serializer};

use crate::chain_list::{ChainListProvider, CHAINS};
use crate::config::Config;
use crate::storage::{PremintStorage, Reader};
use crate::storage::Reader;
use crate::types::PremintTypes;

#[derive(Debug, PartialEq, Eq, Clone)]
Expand Down
3 changes: 1 addition & 2 deletions src/run.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
use alloy::hex;
use libp2p::identity;
use libp2p::identity::Keypair;
use std::time::Duration;
use tracing::{info_span, Instrument};
Expand All @@ -10,7 +9,7 @@ use crate::config::{BootNodes, ChainInclusionMode, Config};
use crate::controller::{Controller, ControllerCommands, ControllerInterface};
use crate::p2p::SwarmController;
use crate::rules::RulesEngine;
use crate::storage::{PremintStorage, Reader};
use crate::storage::PremintStorage;
use crate::types::Premint;

/// Starts the libp2p swarm, the controller, and the checkers if applicable, then wires them all up.
Expand Down
2 changes: 1 addition & 1 deletion src/storage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use sqlx::Row;
use sqlx::{QueryBuilder, Sqlite, SqlitePool};

use crate::config::Config;
use crate::types::{InclusionClaim, Premint, PremintName, PremintTypes};
use crate::types::{InclusionClaim, PremintName, PremintTypes};

async fn init_db(config: &Config) -> SqlitePool {
let expect_msg =
Expand Down

0 comments on commit 7088ed7

Please sign in to comment.