File tree Expand file tree Collapse file tree 1 file changed +4
-10
lines changed Expand file tree Collapse file tree 1 file changed +4
-10
lines changed Original file line number Diff line number Diff line change @@ -691,26 +691,20 @@ See '<cyan,bold>cargo help</> <cyan><<command>></>' for more information on a sp
691691 } ) )
692692 } ) . collect ( )
693693 } ) ) )
694- . arg ( Arg :: new ( "toolchain" )
695- . help ( "Specifies the toolchain to use for this command" )
696- . value_name ( "TOOLCHAIN" )
697- . action ( ArgAction :: Set )
698- . add ( clap_complete:: engine:: ArgValueCompleter :: new ( |partial : & OsStr | {
699- let toolchains = get_toolchains_from_rustup ( ) ;
700-
701- toolchains
694+ . add ( clap_complete:: engine:: SubcommandCandidates :: new ( || {
695+ get_toolchains_from_rustup ( )
702696 . into_iter ( )
703- . filter ( |t| OsStr :: new ( t) . as_encoded_bytes ( ) . starts_with ( partial. as_encoded_bytes ( ) ) )
704697 . map ( |t| clap_complete:: CompletionCandidate :: new ( t) )
705698 . collect ( )
706- } ) ) )
699+ } ) )
707700 . subcommands ( commands:: builtin ( ) )
708701}
709702
710703fn get_toolchains_from_rustup ( ) -> Vec < String > {
711704 let output = std:: process:: Command :: new ( "rustup" )
712705 . arg ( "toolchain" )
713706 . arg ( "list" )
707+ . arg ( "-q" )
714708 . output ( )
715709 . unwrap ( ) ;
716710
You can’t perform that action at this time.
0 commit comments