Is there any way to fix ONLY unused imports in Rust automatically? I have seen cargo fix
, which does work, but it makes a whole bunch of other fixes too. Is there any way to tell cargo fix
to only fix unused imports (preferably in a specified file) and nothing else?
Side question: Is there any way to make IntelliJ do this? The usual shortcut (Cmd+Option+O) works in other languages, but for Rust, it just re-orders the imports.