[scripts] Clean up rust_pre_commit.sh using ShellCheck
Summary: Related Linear issue here. This is part of a set of diffs that will allow ShellCheck to be added to the CI. See inline comments for specific details of the ShellCheck error/warning output.
Test Plan:
ShellCheck
Not entirely sure when this script is run, but the changes in this file are comments and adding double quotes, so I'm reasonably assuming it will continue to work as expected. My guess is this is a pre-commit script, but since I didn't commit any Rust code I don't know if it's still working. Adding @varun as a reviewer because Rust.
Reviewers: atul, jon, tomek, ashoat, varun
Reviewed By: atul, jon, varun
Subscribers: varun, adrian
Differential Revision: https://phab.comm.dev/D4718