Enable Clippy and fix warnings

- Drop unnecessary ampersands
- Use `.is_empty()` rather than `.len()` comparisons
- Don't `use` top-level imports
- Constants automatically have the `'static` lifetime
- Use `matches!` macro
- Don't cast `as` the same type
- Drop unnecessary `return`
- Drop unnecessary 1-arg closure in `.map()`
- Elide unncessary lifetimes

Bug: 342362349
Test: build
Change-Id: I59c55d41a770a912a74eebf0ef6f3b317c381c2a
11 files changed