Skip to content

Commit 24a3860

Browse files
committed
refactor(toolchain): reuse dist::triple::known in toolchain::names
1 parent 390657b commit 24a3860

File tree

1 file changed

+4
-45
lines changed

1 file changed

+4
-45
lines changed

src/toolchain/names.rs

Lines changed: 4 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -491,54 +491,13 @@ mod tests {
491491
use proptest::{collection::vec, prelude::*, string::string_regex};
492492

493493
use crate::{
494-
dist::dist::PartialToolchainDesc,
494+
dist::{
495+
dist::PartialToolchainDesc,
496+
triple::known::{LIST_ARCHS, LIST_ENVS, LIST_OSES},
497+
},
495498
toolchain::names::{CustomToolchainName, ResolvableToolchainName, ToolchainName},
496499
};
497500

498-
//Duplicated from triple.rs as a pragmatic step. TODO: remove duplication.
499-
static LIST_ARCHS: &[&str] = &[
500-
"i386",
501-
"i586",
502-
"i686",
503-
"x86_64",
504-
"arm",
505-
"armv7",
506-
"armv7s",
507-
"aarch64",
508-
"mips",
509-
"mipsel",
510-
"mips64",
511-
"mips64el",
512-
"powerpc",
513-
"powerpc64",
514-
"powerpc64le",
515-
"riscv64gc",
516-
"s390x",
517-
"loongarch64",
518-
];
519-
static LIST_OSES: &[&str] = &[
520-
"pc-windows",
521-
"unknown-linux",
522-
"apple-darwin",
523-
"unknown-netbsd",
524-
"apple-ios",
525-
"linux",
526-
"rumprun-netbsd",
527-
"unknown-freebsd",
528-
"unknown-illumos",
529-
];
530-
static LIST_ENVS: &[&str] = &[
531-
"gnu",
532-
"gnux32",
533-
"msvc",
534-
"gnueabi",
535-
"gnueabihf",
536-
"gnuabi64",
537-
"androideabi",
538-
"android",
539-
"musl",
540-
];
541-
542501
fn partial_toolchain_desc_re() -> String {
543502
let triple_re = format!(
544503
r"(-({}))?(?:-({}))?(?:-({}))?",

0 commit comments

Comments
 (0)