rust-lang / rustwide

Execute your code on the Rust ecosystem.
Apache License 2.0
180 stars 41 forks source link

Add an API to remove unused toolchains #1

Closed pietroalbini closed 5 years ago

pietroalbini commented 5 years ago

There should be an API to remove unused toolchains. Possible implementation idea:

let current = Toolchain::Dist { name: "nightly-1970-01-01".into() };
for toolchain in workspace.installed_toolchains()? {
    if toolchain != current {
        toolchain.remove()?;
    }
}
pietroalbini commented 5 years ago

Fixed on master.