Fix several new warnings from clippy +nightly
In the time since I last opened an MR to do this, the clippy folks have busily added a passel of new and improved lints. This branch tries to resolve them across our codebase.
I'm assigning review to @Diziet since some of this touches APIs that they designed.