Skip to content

Commit 670b729

Browse files
epagerami3l
authored andcommitted
refactor(toolchain): Order logic by display order
1 parent 444b665 commit 670b729

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

src/cli/common.rs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,13 @@ pub(crate) async fn list_toolchains(
307307
return Ok(());
308308
}
309309

310+
let status_str = match (is_default, is_active) {
311+
(true, true) => " (active, default)",
312+
(true, false) => " (default)",
313+
(false, true) => " (active)",
314+
(false, false) => "",
315+
};
316+
310317
let toolchain_path = cfg.toolchains_dir.join(toolchain);
311318
let toolchain_meta = fs::symlink_metadata(&toolchain_path)?;
312319
let toolchain_path = if verbose {
@@ -318,12 +325,6 @@ pub(crate) async fn list_toolchains(
318325
} else {
319326
String::new()
320327
};
321-
let status_str = match (is_default, is_active) {
322-
(true, true) => " (active, default)",
323-
(true, false) => " (default)",
324-
(false, true) => " (active)",
325-
(false, false) => "",
326-
};
327328

328329
writeln!(
329330
cfg.process.stdout().lock(),

0 commit comments

Comments
 (0)