Rename binary to cargo-fix
Closed this issue · 2 comments
oli-obk commented
After a cargo install rustfix
, the subcommand cargo fix
would be available.
killercup commented
Can we cheat and add two [[bin]]
with "rustfix" and "cargo-fix" as names, but both with src/main.rs
as target? :D
oli-obk commented
Cargo will produce
warning: file found to be present in multiple build targets: src/main.rs
if we do that :(
I guess we can move the logic to lib.rs and load it from both src/bin/rustfix.rs
and src/bin/cargo-fix.rs
which simply have the same source code. Or go the extremely hacky route of creating src/bin/cargo-fix.rs
with the content include!("../main.rs")