Skip to content

Commit de7e3e7

Browse files
authored
Merge pull request #27 from kellda/remove_component
Allow removing a component
2 parents e9a8918 + c461c0e commit de7e3e7

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
55

66
## Unreleased
77

8+
### Added
9+
10+
- New method `Toolchain::remove_component`
11+
812
## [0.8.0] - 2020-06-05
913

1014
### Added

src/toolchain.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,16 @@ impl Toolchain {
239239
self.change_rustup_thing(workspace, RustupAction::Add, RustupThing::Component, name)
240240
}
241241

242+
/// Remove a component already installed for the toolchain.
243+
pub fn remove_component(&self, workspace: &Workspace, name: &str) -> Result<(), Error> {
244+
self.change_rustup_thing(
245+
workspace,
246+
RustupAction::Remove,
247+
RustupThing::Component,
248+
name,
249+
)
250+
}
251+
242252
/// Download and install a target for the toolchain.
243253
///
244254
/// If the toolchain is not installed in the workspace an error will be returned. This is only

0 commit comments

Comments
 (0)