I originally submitted this to rust-lang, but it was closed as a clippy issue: https://github.com/rust-lang/rust/issues/65184