You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
for item in patreon_response.data{ifletItem::Member(member) = item {ifletSome(full_name) = member.attributes.full_name.as_deref(){ifletSome(entitled) = member.rel("currently_entitled_tiers"){for item_ref in entitled.data.iter(){letItemRef::Tier(tier_id) = item_ref;ifletSome(tier) = tiers_per_id.get(&tier_id.id){ifletSome(title) = tier.attributes.title.as_deref(){if credited_tiers.contains(title){
credited_patrons.insert(full_name.to_string());}else{trace!("Tier {title} not credited");}}}else{trace!("Tier for id {} not found", tier_id.id);}}}else{trace!("No currently_entitled_tiers for member: {}", full_name);}}}}
With 1.65.0's if let this no longer needs to be a tower?
for item in patreon_response.data{ifletItem::Member(member) = item else {continue;}ifletSome(full_name) = member.attributes.full_name.as_deref()else{continue;}ifletSome(entitled) = member.rel("currently_entitled_tiers")else{trace!("No currently_entitled_tiers for member: {}", full_name);}for item_ref in entitled.data.iter(){letItemRef::Tier(tier_id) = item_ref;ifletSome(tier) = tiers_per_id.get(&tier_id.id)else{trace!("Tier for id {} not found", tier_id.id);}ifletSome(title) = tier.attributes.title.as_deref()else{continue;}if credited_tiers.contains(title){
credited_patrons.insert(full_name.to_string());}else{trace!("Tier {title} not credited");}}}
Not sure if that's actually better or just different and I'm like "Oh I know a thing. Maybe I should use the thing."
The text was updated successfully, but these errors were encountered:
No I agree, this would be a fantastic place for it. I think I'll wait until rustfmt is able to format let else properly until I do that though!
fasterthanlime
changed the title
Implementing "Log in with GitHub"
Use let-if chain in "Log in with github" bit when rustfmt supports them
Mar 11, 2023
It's no so much "wrong" as it could be updated I think -- This moves away from ...
https://fasterthanli.me/series/updating-fasterthanli-me-for-2022/part-6#position=59.3
Here's what it is:
With 1.65.0's if let this no longer needs to be a tower?
Not sure if that's actually better or just different and I'm like "Oh I know a thing. Maybe I should use the thing."
The text was updated successfully, but these errors were encountered: