From ded2935fa52ccac51b1ac98a073479048b3925fb Mon Sep 17 00:00:00 2001 From: Gianmarco Fraccaroli Date: Sat, 29 Jun 2024 15:15:17 +0200 Subject: [PATCH] revert se changes, minors --- rust-toolchain.toml | 2 +- src/app.rs | 8 ++------ src/handler/faucet.rs | 12 +++--------- src/sdk/namada.rs | 2 +- src/state/faucet.rs | 4 ++-- 5 files changed, 9 insertions(+), 19 deletions(-) diff --git a/rust-toolchain.toml b/rust-toolchain.toml index e61c95c..3f50f19 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,3 +1,3 @@ [toolchain] -channel = "1.75.0" +channel = "1.78.0" components = ["rustc", "cargo", "rust-std", "rust-docs", "rls", "rust-src", "rust-analysis"] \ No newline at end of file diff --git a/src/app.rs b/src/app.rs index b1cd3bf..305b800 100644 --- a/src/app.rs +++ b/src/app.rs @@ -16,12 +16,8 @@ use axum::{ }; use lazy_static::lazy_static; use namada_sdk::{ - args::TxBuilder, - io::NullIo, - masp::fs::FsShieldedUtils, - address::Address, chain::ChainId, key::RefTo, - wallet::fs::FsWalletUtils, - NamadaImpl, + address::Address, args::TxBuilder, chain::ChainId, io::NullIo, key::RefTo, + masp::fs::FsShieldedUtils, wallet::fs::FsWalletUtils, NamadaImpl, }; use rand::{distributions::Alphanumeric, thread_rng, Rng}; use serde_json::json; diff --git a/src/handler/faucet.rs b/src/handler/faucet.rs index b6392e5..b2cd263 100644 --- a/src/handler/faucet.rs +++ b/src/handler/faucet.rs @@ -3,19 +3,13 @@ use std::collections::HashMap; use axum::{extract::State, Json}; use axum_macros::debug_handler; use namada_sdk::{ - args::InputAmount, - rpc, - signing::default_sign, - tendermint::abci::Code, - tx::data::ResultCode, - address::Address, - masp::{TransferSource, TransferTarget}, - Namada, + address::Address, args::InputAmount, rpc, signing::default_sign, tendermint::abci::Code, + tx::data::ResultCode, Namada, }; use crate::{ dto::faucet::{ - self, FaucetRequestDto, FaucetResponseDto, FaucetResponseStatusDto, FaucetSettingResponse + FaucetRequestDto, FaucetResponseDto, FaucetResponseStatusDto, FaucetSettingResponse, }, error::{api::ApiError, faucet::FaucetError, validate::ValidatedRequest}, repository::faucet::FaucetRepositoryTrait, diff --git a/src/sdk/namada.rs b/src/sdk/namada.rs index 4f3481a..f7ece83 100644 --- a/src/sdk/namada.rs +++ b/src/sdk/namada.rs @@ -1,7 +1,7 @@ use namada_sdk::{ io::NullIo, - masp::{fs::FsShieldedUtils, ShieldedContext}, key::common::SecretKey, + masp::{fs::FsShieldedUtils, ShieldedContext}, wallet::{fs::FsWalletUtils, Wallet}, NamadaImpl, }; diff --git a/src/state/faucet.rs b/src/state/faucet.rs index dd92fe3..dc5faaf 100644 --- a/src/state/faucet.rs +++ b/src/state/faucet.rs @@ -6,8 +6,7 @@ use std::sync::Arc; use tokio::sync::RwLock; use namada_sdk::{ - io::NullIo, masp::fs::FsShieldedUtils, address::Address, wallet::fs::FsWalletUtils, - NamadaImpl, + address::Address, io::NullIo, masp::fs::FsShieldedUtils, wallet::fs::FsWalletUtils, NamadaImpl, }; use tendermint_rpc::HttpClient; @@ -25,6 +24,7 @@ pub struct FaucetState { } impl FaucetState { + #[allow(clippy::too_many_arguments)] pub fn new( data: &Arc>, faucet_address: Address,