Skip to content

Commit 6bd69e0

Browse files
committed
install: take ownership in InstallMethod::install()
1 parent c8df29b commit 6bd69e0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/install.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,13 @@ pub(crate) enum InstallMethod<'a> {
3737
impl InstallMethod<'_> {
3838
// Install a toolchain
3939
#[tracing::instrument(level = "trace", err(level = "trace"), skip_all)]
40-
pub(crate) async fn install(&self) -> Result<UpdateStatus> {
40+
pub(crate) async fn install(self) -> Result<UpdateStatus> {
4141
// Initialize rayon for use by the remove_dir_all crate limiting the number of threads.
4242
// This will error if rayon is already initialized but it's fine to ignore that.
4343
let _ = rayon::ThreadPoolBuilder::new()
4444
.num_threads(self.cfg().process.io_thread_count()?)
4545
.build_global();
46-
match self {
46+
match &self {
4747
InstallMethod::Copy { .. }
4848
| InstallMethod::Link { .. }
4949
| InstallMethod::Dist(DistOptions {
@@ -63,7 +63,7 @@ impl InstallMethod<'_> {
6363
}
6464
true => {
6565
debug!("toolchain {} installed", self.dest_basename());
66-
match self {
66+
match &self {
6767
InstallMethod::Dist(DistOptions {
6868
old_date_version: Some((_, v)),
6969
..

0 commit comments

Comments
 (0)