Automated way to remove let chains

⚓ Rust    📅 2025-08-18    👤 surdeus    👁️ 2      

surdeus

Is there a way to automate removing let chains?

I have a codebase which I'd like to maintain support for latest stable rust as well as 1.85.

Notably Rust 1.85 doesn't support let-chains. I find that let-chains do improve the code quality quite a bit so I'd like to continue using them.

I'm thinking of ways I can maintain both branches moving forward. One thought I had: If a clippy fixup lint existed for let-chains I could just apply that to produce code that's 1.85 compatible.

1 post - 1 participant

Read full topic

🏷️ Rust_feed