Skip to content

Commit

Permalink
Fix warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
surangap committed Jul 19, 2024
1 parent 3d5a4c2 commit a401942
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 10 deletions.
4 changes: 2 additions & 2 deletions pallet/doughnut/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -458,10 +458,10 @@ pub mod pallet {
);

// permission domain - topping validations
let Some(topping_payload) = doughnut_v1.get_topping(TRN_PERMISSION_DOMAIN) else {
let Some(mut topping_payload) = doughnut_v1.get_topping(TRN_PERMISSION_DOMAIN) else {
return Err(Error::<T>::TRNDomainNotfound)?
};
let topping = Topping::decode(&mut topping_payload.clone())
let topping = Topping::decode(&mut topping_payload)
.map_err(|_| Error::<T>::ToppingDecodeFailed)?;

// check topping permissions
Expand Down
2 changes: 1 addition & 1 deletion pallet/ethy/src/ethereum_http_cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use sp_std::prelude::*;

#[cfg(not(feature = "std"))]
use sp_std::alloc::string::ToString;
#[cfg(std)]
#[cfg(feature = "std")]
use std::string::ToString;

use seed_pallet_common::log;
Expand Down
4 changes: 2 additions & 2 deletions pallet/futurepass/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ targets = ["x86_64-unknown-linux-gnu"]

[dependencies]
hex = { workspace = true }
hex-literal = { workspace = true, optional = true }
hex-literal = { workspace = true }
codec = { workspace = true }
log = { workspace = true }
scale-info = { workspace = true }
Expand Down Expand Up @@ -66,4 +66,4 @@ std = [
"precompile-utils/std",
]
try-runtime = ["frame-support/try-runtime"]
runtime-benchmarks = ["frame-benchmarking", "hex-literal", "seed-runtime/runtime-benchmarks"]
runtime-benchmarks = ["frame-benchmarking", "seed-runtime/runtime-benchmarks"]
1 change: 0 additions & 1 deletion pallet/nft/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ mod impls;
pub mod traits;
mod types;

pub use impls::*;
pub use pallet::*;
pub use types::*;

Expand Down
1 change: 0 additions & 1 deletion pallet/sft/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ mod weights;

pub use weights::WeightInfo;

pub use impls::*;
pub use pallet::*;
pub use types::*;

Expand Down
1 change: 1 addition & 0 deletions pallet/token-approvals/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ pub fn create_account(seed: u64) -> AccountId {
AccountId::from(H160::from_low_u64_be(seed))
}

#[allow(dead_code)]
pub struct TestData {
pub coll_owner: AccountId,
pub coll_id: CollectionUuid,
Expand Down
4 changes: 2 additions & 2 deletions pallet/tx-fee-pot/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ impl<T: Config> OnUnbalanced<FeeNegativeImbalanceOf<T>> for Pallet<T> {
// this amount was burnt from caller when tx fees were paid (incl. tip), move the funds into
// the pot
let note_amount = amount.peek();
T::FeeCurrency::deposit_creating(&Self::account_id(), note_amount);
let _ = T::FeeCurrency::deposit_creating(&Self::account_id(), note_amount);

Self::accrue_era_tx_fees(note_amount);
}
Expand Down Expand Up @@ -160,7 +160,7 @@ impl<T: Config> OnUnbalanced<StakeNegativeImbalanceOf<T>> for Pallet<T> {
let note_amount = amount.peek();

// mint `note_amount` (offsets `amount` imbalance)
T::StakeCurrency::deposit_creating(&Self::account_id(), note_amount);
let _ = T::StakeCurrency::deposit_creating(&Self::account_id(), note_amount);
}
}

Expand Down
2 changes: 1 addition & 1 deletion pallet/xrpl/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ impl TryFrom<&[u8]> for XRPLTransaction {
type Error = &'static str;

fn try_from(value: &[u8]) -> Result<Self, Self::Error> {
let deserializer = &mut Deserializer::new(value.clone().to_vec(), field_info_lookup());
let deserializer = &mut Deserializer::new(value.to_vec(), field_info_lookup());
let tx_json = deserializer
.to_json(&TypeCode::Object, &value)
.map_err(|_e| "failed to convert encoded_msg to json value")?;
Expand Down

0 comments on commit a401942

Please sign in to comment.