chore: fix needless borrows found by clippy

1 job for rust_edidtion in 1 minute and 11 seconds (queued for 6 seconds)