@@ -1115,8 +1115,8 @@ fn show(cfg: &Cfg, m: &ArgMatches<'_>) -> Result<utils::ExitCode> {
1115
1115
} ;
1116
1116
1117
1117
let show_installed_toolchains = installed_toolchains. len ( ) > 1 ;
1118
- let show_active_targets = active_targets. len ( ) > 1 ;
1119
1118
let show_active_toolchain = true ;
1119
+ let show_active_targets = active_targets. len ( ) > 1 ;
1120
1120
1121
1121
// Only need to display headers if we have multiple sections
1122
1122
let show_headers = [
@@ -1158,26 +1158,6 @@ fn show(cfg: &Cfg, m: &ArgMatches<'_>) -> Result<utils::ExitCode> {
1158
1158
} ;
1159
1159
}
1160
1160
1161
- if show_active_targets {
1162
- let mut t = term2:: stdout ( ) ;
1163
- if show_headers {
1164
- print_header :: < Error > ( & mut t, "installed targets for active toolchain" ) ?;
1165
- }
1166
- for at in active_targets {
1167
- writeln ! (
1168
- t,
1169
- "{}" ,
1170
- at. component
1171
- . target
1172
- . as_ref( )
1173
- . expect( "rust-std should have a target" )
1174
- ) ?;
1175
- }
1176
- if show_headers {
1177
- writeln ! ( t) ?;
1178
- } ;
1179
- }
1180
-
1181
1161
if show_active_toolchain {
1182
1162
let mut t = term2:: stdout ( ) ;
1183
1163
if show_headers {
@@ -1214,6 +1194,26 @@ fn show(cfg: &Cfg, m: &ArgMatches<'_>) -> Result<utils::ExitCode> {
1214
1194
}
1215
1195
}
1216
1196
1197
+ if show_active_targets {
1198
+ let mut t = term2:: stdout ( ) ;
1199
+ if show_headers {
1200
+ print_header :: < Error > ( & mut t, "installed targets for active toolchain" ) ?;
1201
+ }
1202
+ for at in active_targets {
1203
+ writeln ! (
1204
+ t,
1205
+ "{}" ,
1206
+ at. component
1207
+ . target
1208
+ . as_ref( )
1209
+ . expect( "rust-std should have a target" )
1210
+ ) ?;
1211
+ }
1212
+ if show_headers {
1213
+ writeln ! ( t) ?;
1214
+ } ;
1215
+ }
1216
+
1217
1217
fn print_header < E > ( t : & mut term2:: StdoutTerminal , s : & str ) -> std:: result:: Result < ( ) , E >
1218
1218
where
1219
1219
E : From < term:: Error > + From < std:: io:: Error > ,
0 commit comments