Surprising(?) unused variable

⚓ Rust    📅 2026-05-07    👤 surdeus    👁️ 1      

surdeus

Why does clippy think b is unused, if the code does this:

    assert!(matches!(n, Some(b)));

Complete example here:

6 posts - 4 participants

Read full topic

🏷️ Rust_feed