Skip to content

Commit

Permalink
clippy fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Sajjon committed Sep 28, 2024
1 parent c5b2286 commit 85241af
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 14 deletions.
8 changes: 3 additions & 5 deletions src/factor_instances_provider/factor_instances_provider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -217,12 +217,10 @@ impl FactorInstancesProvider {
let (to_use_directly, to_cache) =
v.split_at(number_of_instances_to_use_directly);

let to_use_directly = to_use_directly
.into_iter()
.cloned()
.collect::<FactorInstances>();
let to_use_directly =
to_use_directly.iter().cloned().collect::<FactorInstances>();

let to_cache = to_cache.into_iter().cloned().collect::<FactorInstances>();
let to_cache = to_cache.iter().cloned().collect::<FactorInstances>();

NewlyDerived::maybe_some_to_use_directly(k, to_cache, to_use_directly)
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,21 +144,20 @@ impl FactorInstancesRequestPurpose {
let unfactored = self.unfactored_requests();

// Form requests tied to FactorSources, but without indices, unquantified
let unquantified = unfactored.for_each_factor_source(factor_sources);
unquantified

unfactored.for_each_factor_source(factor_sources)
}

pub fn requests_with_quantity(
&self,
quantity: DerivationRequestQuantitySelector,
) -> QuantifiedUnindexDerivationRequests {
let unquantified = self.unquantified_factored();
let quantified = unquantified

unquantified
.into_iter()
.map(|x| QuantifiedUnindexDerivationRequest::quantifying(x, quantity))
.collect::<QuantifiedUnindexDerivationRequests>();

quantified
.collect::<QuantifiedUnindexDerivationRequests>()
}

pub fn requests(&self) -> QuantifiedUnindexDerivationRequests {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,6 @@ impl NextIndexAssignerWithEphemeralLocalOffsets {

let from_local = self.ephemeral_local_offsets.write_next(unindexed_request);

let next = from_profile.add_n(from_local as HDPathValue);

next
from_profile.add_n(from_local as HDPathValue)
}
}

0 comments on commit 85241af

Please sign in to comment.