This is a small crate that exposes a single function to find a component installed across all toolchains managed by rustup.
Link
If you do not have rustfmt installed locally, you can just run the unit tests by issuing this command:
rustfmt
sh cargo test --lib