Damus
Esteban Küber :rust: profile picture
Esteban Küber :rust:
@Esteban Küber :rust:

"We spent decades trying to invent a sufficiently smart compiler when we should have been inventing a sufficiently empathetic one." — @benleedom

#Rust Compiler team member. If you have to search for answers when the compiler is talking to you, that's a bug.

There are no bad programmers, only insufficiently advanced compilers.

Cache-locality awareness evangelist. UTF-8 maximalist.

You can't "individual responsibility" your way out of systemic problems.

he/him

Trans rights are human rights

No relay list published yet.

Recent Notes

Esteban Küber :rust: profile picture
#RustLang pro-tip:

When wanting to inspect the value of a binding in a let-chain, you can take advantage of blocks being expressions as well and add one in the middle of the chain

if let Some(next) = iter.peek()
&& {
tracing::info!(?next);
true
}
&& let Some(...) = ...

This is less disruptive than having to disentangle the chain every time you want to inspect something in the middle

#Rust
1
Shane Celis · 1w
nostr:nprofile1qy2hwumn8ghj7un9d3shjtnyd968gmewwp6kyqpq2dhrt3fkk7cpdfulpcxav2mnvqsev2dczqahwtm2xakk6fvvwugsskdns3 That's a cool trick in general. In this case I'd opt to use Option::inspect. if let Some(next) = iter.peek().inspect(|next| tracing::info!(?next)) ... https://doc.rust-lang.org/std/opt...