Homogeneous try blocks

⚓ Rust    📅 2026-03-30    👤 surdeus    👁️ 9      

surdeus

Info

This post is auto-generated from RSS feed The Rust Programming Language Forum - Latest topics. Source: Homogeneous try blocks

I see that we might be getting homogeneous try blocks soon. This is very exciting! Do they have any "exotic" or unexpected applications beyond blocks that return Option<T> or Result<T, E>?

Also, is clippy going to start encouraging writing stuff like try { (x?, y? + 1) } in favor of x.zip(y).map(|(a, b)| (a, b + 1))?

3 posts - 2 participants

Read full topic

🏷️ Rust_feed