Skip to content

Commit 06b788f

Browse files
committed
arm-targets switch to HashSet
It just seems to make more sense than doing a linear walk of a Vec.
1 parent 7205e61 commit 06b788f

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

arm-targets/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
//! cargo:rustc-check-cfg=cfg(arm_abi, values("eabi", "eabihf"))
4141
//! ```
4242
43-
use std::env;
43+
use std::{collections::HashSet, env};
4444

4545
#[derive(Default, Debug)]
4646
pub struct TargetInfo {
@@ -265,7 +265,7 @@ impl Arch {
265265
pub fn from_cargo_env() -> Option<Self> {
266266
let arch = env::var("CARGO_CFG_TARGET_ARCH").ok()?;
267267
let features = env::var("CARGO_CFG_TARGET_FEATURE").ok()?;
268-
let features = features.split(",").collect::<Vec<_>>();
268+
let features: HashSet<&str> = features.split(",").collect();
269269

270270
if (arch == "arm" && features.contains(&"v8")) || arch == "aarch64" {
271271
if features.contains(&"mclass") {

0 commit comments

Comments
 (0)