@@ -4,7 +4,7 @@ use std::fs;
4
4
use std:: io:: { BufRead , ErrorKind , Write } ;
5
5
use std:: path:: Path ;
6
6
use std:: sync:: Arc ;
7
- use std:: { cmp, env, iter } ;
7
+ use std:: { cmp, env} ;
8
8
9
9
use anyhow:: { anyhow, Context , Result } ;
10
10
use git_testament:: { git_testament, render_testament} ;
@@ -229,7 +229,7 @@ fn show_channel_updates(cfg: &Cfg, toolchains: Vec<(String, Result<UpdateStatus>
229
229
230
230
for ( name, banner, width, color, version, previous_version) in data {
231
231
let padding = max_width - width;
232
- let padding: String = iter :: repeat ( ' ' ) . take ( padding) . collect ( ) ;
232
+ let padding: String = " " . repeat ( padding) ;
233
233
let _ = write ! ( t, " {}" , padding) ;
234
234
let _ = t. attr ( term2:: Attr :: Bold ) ;
235
235
if let Some ( color) = color {
@@ -356,7 +356,7 @@ where
356
356
357
357
pub fn list_targets ( toolchain : & Toolchain < ' _ > ) -> Result < utils:: ExitCode > {
358
358
let mut t = term2:: stdout ( ) ;
359
- let distributable = DistributableToolchain :: new_for_components ( & toolchain) ?;
359
+ let distributable = DistributableToolchain :: new_for_components ( toolchain) ?;
360
360
let components = distributable. list_components ( ) ?;
361
361
for component in components {
362
362
if component. component . short_name_in_manifest ( ) == "rust-std" {
@@ -380,7 +380,7 @@ pub fn list_targets(toolchain: &Toolchain<'_>) -> Result<utils::ExitCode> {
380
380
381
381
pub fn list_installed_targets ( toolchain : & Toolchain < ' _ > ) -> Result < utils:: ExitCode > {
382
382
let mut t = term2:: stdout ( ) ;
383
- let distributable = DistributableToolchain :: new_for_components ( & toolchain) ?;
383
+ let distributable = DistributableToolchain :: new_for_components ( toolchain) ?;
384
384
let components = distributable. list_components ( ) ?;
385
385
for component in components {
386
386
if component. component . short_name_in_manifest ( ) == "rust-std" {
@@ -399,7 +399,7 @@ pub fn list_installed_targets(toolchain: &Toolchain<'_>) -> Result<utils::ExitCo
399
399
400
400
pub fn list_components ( toolchain : & Toolchain < ' _ > ) -> Result < utils:: ExitCode > {
401
401
let mut t = term2:: stdout ( ) ;
402
- let distributable = DistributableToolchain :: new_for_components ( & toolchain) ?;
402
+ let distributable = DistributableToolchain :: new_for_components ( toolchain) ?;
403
403
let components = distributable. list_components ( ) ?;
404
404
for component in components {
405
405
let name = component. name ;
@@ -417,7 +417,7 @@ pub fn list_components(toolchain: &Toolchain<'_>) -> Result<utils::ExitCode> {
417
417
418
418
pub fn list_installed_components ( toolchain : & Toolchain < ' _ > ) -> Result < utils:: ExitCode > {
419
419
let mut t = term2:: stdout ( ) ;
420
- let distributable = DistributableToolchain :: new_for_components ( & toolchain) ?;
420
+ let distributable = DistributableToolchain :: new_for_components ( toolchain) ?;
421
421
let components = distributable. list_components ( ) ?;
422
422
for component in components {
423
423
if component. installed {
0 commit comments