File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -704,7 +704,7 @@ See '<bright-cyan,bold>cargo help</> <cyan><<command>></>' for more information
704704 . map ( |t| clap_complete:: CompletionCandidate :: new ( t) )
705705 . collect :: < Vec < _ > > ( ) ;
706706 if let Ok ( gctx) = new_gctx_for_completions ( ) {
707- candidates. extend ( get_alias_candidates ( & gctx) ) ;
707+ candidates. extend ( get_command_candidates ( & gctx) ) ;
708708 }
709709 candidates
710710 } ) )
@@ -728,11 +728,11 @@ fn get_toolchains_from_rustup() -> Vec<String> {
728728 stdout. lines ( ) . map ( |line| format ! ( "+{}" , line) ) . collect ( )
729729}
730730
731- fn get_alias_candidates ( gctx : & GlobalContext ) -> Vec < clap_complete:: CompletionCandidate > {
732- let alias_map = user_defined_aliases ( gctx) ;
733- alias_map
731+ fn get_command_candidates ( gctx : & GlobalContext ) -> Vec < clap_complete:: CompletionCandidate > {
732+ let commands = user_defined_aliases ( gctx) ;
733+ commands
734734 . iter ( )
735- . map ( |( alias , cmd_info) | {
735+ . map ( |( name , cmd_info) | {
736736 let help_text = match cmd_info {
737737 CommandInfo :: Alias { target } => {
738738 let cmd_str = target
@@ -749,7 +749,7 @@ fn get_alias_candidates(gctx: &GlobalContext) -> Vec<clap_complete::CompletionCa
749749 unreachable ! ( "External command shouldn't appear in alias map" )
750750 }
751751 } ;
752- clap_complete:: CompletionCandidate :: new ( alias . clone ( ) ) . help ( Some ( help_text. into ( ) ) )
752+ clap_complete:: CompletionCandidate :: new ( name . clone ( ) ) . help ( Some ( help_text. into ( ) ) )
753753 } )
754754 . collect ( )
755755}
You can’t perform that action at this time.
0 commit comments