Use let chain to avoid `clippy::unnecessary_unwrap` (#46409)

No bug, just shows up running the tests on `clippy 0.1.92 (ded5c06cf2
2025-12-08)`

Release Notes:

- N/A
3f2c7c6d30Martin Pool committed on 1/11/2026, 8:20:08 AM· committed by GitHubparentaf6385a
1 file changedLine totals unavailable