From 3205d9ca0463376fc910cf369de6277660c1177c Mon Sep 17 00:00:00 2001 From: Barsik-sus Date: Mon, 15 Jul 2024 19:05:53 +0300 Subject: [PATCH] fix: toolchain without `-` in the name --- module/move/willbe/src/entity/channel.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/module/move/willbe/src/entity/channel.rs b/module/move/willbe/src/entity/channel.rs index 5d0d33b1d3..cb45418c06 100644 --- a/module/move/willbe/src/entity/channel.rs +++ b/module/move/willbe/src/entity/channel.rs @@ -66,8 +66,9 @@ mod private let list = report .out .lines() - .map( | l | l.split_once( '-' ).unwrap().0 ) - .filter_map( | c | match c + // toolchain with a name without `-` may exist, but we are looking at specific ones + .filter_map( | l | l.split_once( '-' ) ) + .filter_map( |( c, _ ) | match c { "stable" => Some( Channel::Stable ), "nightly" => Some( Channel::Nightly ),