Skip to content

Commit 38130d7

Browse files
committed
Remove std_detect from stdarch examples
1 parent 21c01a1 commit 38130d7

File tree

4 files changed

+17
-29
lines changed

4 files changed

+17
-29
lines changed

library/stdarch/Cargo.lock

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -574,18 +574,6 @@ version = "0.1.25"
574574
source = "registry+https://github.com/rust-lang/crates.io-index"
575575
checksum = "989e6739f80c4ad5b13e0fd7fe89531180375b18520cc8c82080e4dc4035b84f"
576576

577-
[[package]]
578-
name = "rustc-std-workspace-alloc"
579-
version = "1.0.1"
580-
source = "registry+https://github.com/rust-lang/crates.io-index"
581-
checksum = "f9d441c3b2ebf55cebf796bfdc265d67fa09db17b7bb6bd4be75c509e1e8fec3"
582-
583-
[[package]]
584-
name = "rustc-std-workspace-core"
585-
version = "1.0.1"
586-
source = "registry+https://github.com/rust-lang/crates.io-index"
587-
checksum = "aa9c45b374136f52f2d6311062c7146bff20fec063c3f5d46a410bd937746955"
588-
589577
[[package]]
590578
name = "ryu"
591579
version = "1.0.20"
@@ -688,16 +676,6 @@ dependencies = [
688676
"syn 2.0.102",
689677
]
690678

691-
[[package]]
692-
name = "std_detect"
693-
version = "0.1.5"
694-
dependencies = [
695-
"cfg-if",
696-
"libc",
697-
"rustc-std-workspace-alloc",
698-
"rustc-std-workspace-core",
699-
]
700-
701679
[[package]]
702680
name = "stdarch-gen-arm"
703681
version = "0.1.0"
@@ -752,7 +730,6 @@ dependencies = [
752730
"core_arch",
753731
"quickcheck",
754732
"rand",
755-
"std_detect",
756733
]
757734

758735
[[package]]

library/stdarch/examples/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ default-run = "hex"
1212

1313
[dependencies]
1414
core_arch = { path = "../crates/core_arch" }
15-
std_detect = { path = "../crates/std_detect" }
1615
quickcheck = "1.0"
1716
rand = "0.8"
1817

library/stdarch/examples/connect5.rs

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,13 @@ use std::cmp;
4040
use std::time::Instant;
4141

4242
#[cfg(target_arch = "x86")]
43-
use {core_arch::arch::x86::*, std_detect::is_x86_feature_detected};
43+
use core_arch::arch::x86::*;
4444
#[cfg(target_arch = "x86_64")]
45-
use {core_arch::arch::x86_64::*, std_detect::is_x86_feature_detected};
45+
use core_arch::arch::x86_64::*;
46+
#[cfg(target_arch = "x86")]
47+
use std::is_x86_feature_detected;
48+
#[cfg(target_arch = "x86_64")]
49+
use std::is_x86_feature_detected;
4650

4751
// types
4852

@@ -558,7 +562,11 @@ fn search(pos: &Pos, alpha: i32, beta: i32, depth: i32, _ply: i32) -> i32 {
558562
assert_ne!(bm, MOVE_NONE);
559563
assert!(bs >= -EVAL_INF && bs <= EVAL_INF);
560564

561-
if _ply == 0 { bm } else { bs } //best move at the root node, best score elsewhere
565+
if _ply == 0 {
566+
bm
567+
} else {
568+
bs
569+
} //best move at the root node, best score elsewhere
562570
}
563571

564572
/// Evaluation function: give different scores to different patterns after a fixed depth.

library/stdarch/examples/hex.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,13 @@ use std::{
3636
};
3737

3838
#[cfg(target_arch = "x86")]
39-
use {core_arch::arch::x86::*, std_detect::is_x86_feature_detected};
39+
use core_arch::arch::x86::*;
4040
#[cfg(target_arch = "x86_64")]
41-
use {core_arch::arch::x86_64::*, std_detect::is_x86_feature_detected};
41+
use core_arch::arch::x86_64::*;
42+
#[cfg(target_arch = "x86")]
43+
use std::is_x86_feature_detected;
44+
#[cfg(target_arch = "x86_64")]
45+
use std::is_x86_feature_detected;
4246

4347
fn main() {
4448
let mut input = Vec::new();

0 commit comments

Comments
 (0)