We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
impl Iterator
Vec
1 parent 3c01125 commit c39c730Copy full SHA for c39c730
src/config.rs
@@ -364,12 +364,14 @@ impl Cfg {
364
Toolchain::from(self, name)
365
}
366
367
- pub fn get_toolchains_from_regex(&self, regex: Regex) -> Result<Vec<Toolchain<'_>>> {
+ pub fn get_toolchains_from_regex(
368
+ &self,
369
+ regex: Regex,
370
+ ) -> Result<impl Itererator<Item = Toolchain<'_>>> {
371
Ok(self
372
.list_toolchains_iter()?
373
.filter(|toolchain| regex.is_match(toolchain))
- .map(|toolchain| Toolchain::from(self, &toolchain).unwrap())
- .collect())
374
+ .map(|toolchain| Toolchain::from(self, &toolchain).unwrap()))
375
376
377
pub fn verify_toolchain(&self, name: &str) -> Result<Toolchain<'_>> {
0 commit comments