Skip to content

Commit

Permalink
fix: clippy errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Supremesource committed Nov 29, 2024
1 parent 7863c49 commit d2a2144
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
4 changes: 1 addition & 3 deletions pallets/subnet_emission/src/decryption.rs
Original file line number Diff line number Diff line change
Expand Up @@ -208,9 +208,7 @@ impl<T: Config> Pallet<T> {
netuid: u16,
weights: Vec<KeylessBlockWeights>,
) -> Result<u64, &'static str> {
weights.into_iter().fold(Ok(0u64), |acc_emission, (block, block_weights)| {
let acc_emission = acc_emission?;

weights.into_iter().try_fold(0u64, |acc_emission, (block, block_weights)| {
// Update weights storage
for (uid, weights) in block_weights.clone() {
Weights::<T>::set(netuid, uid, Some(weights));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -804,7 +804,6 @@ pub struct ConsensusOutput<T: Config> {
pub total_emitted: u64,
}

// TODO: write a test on this
impl<T: Config> ConsensusOutput<T> {
pub fn apply(self) {
use pallet_subspace::*;
Expand Down

0 comments on commit d2a2144

Please sign in to comment.