Skip to content

Commit

Permalink
Rename to clarify try_into target type
Browse files Browse the repository at this point in the history
With type hints enabled, `hex` shows up as a `BoostedHex` going into a
function that expects `BoostedHex`. Renaming to `hex_proto` will
hopefully clear up the need for the type casting.
  • Loading branch information
michaeldjeffrey committed Apr 26, 2024
1 parent 5fba63c commit 3d1fa40
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions boost_manager/src/activator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,9 @@ where
while let Some(msg) = reward_shares.try_next().await? {
let share = MobileRewardShare::decode(msg)?;
if let Some(MobileReward::RadioReward(r)) = share.reward {
for hex in r.boosted_hexes.into_iter() {
process_boosted_hex(txn, manifest_time, &boosted_hexes, &hex.try_into()?)
.await?
for hex_proto in r.boosted_hexes.into_iter() {
let boosted_hex = hex_proto.try_into()?;
process_boosted_hex(txn, manifest_time, &boosted_hexes, &boosted_hex).await?
}
}
}
Expand Down

0 comments on commit 3d1fa40

Please sign in to comment.