Skip to content

Commit 6082972

Browse files
committed
Remove std_detect from stdarch examples
1 parent ffa97a6 commit 6082972

File tree

4 files changed

+18
-30
lines changed

4 files changed

+18
-30
lines changed

library/stdarch/Cargo.lock

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

583-
[[package]]
584-
name = "rustc-std-workspace-alloc"
585-
version = "1.0.1"
586-
source = "registry+https://github.com/rust-lang/crates.io-index"
587-
checksum = "f9d441c3b2ebf55cebf796bfdc265d67fa09db17b7bb6bd4be75c509e1e8fec3"
588-
589-
[[package]]
590-
name = "rustc-std-workspace-core"
591-
version = "1.0.1"
592-
source = "registry+https://github.com/rust-lang/crates.io-index"
593-
checksum = "aa9c45b374136f52f2d6311062c7146bff20fec063c3f5d46a410bd937746955"
594-
595583
[[package]]
596584
name = "ryu"
597585
version = "1.0.20"
@@ -694,16 +682,6 @@ dependencies = [
694682
"syn 2.0.104",
695683
]
696684

697-
[[package]]
698-
name = "std_detect"
699-
version = "0.1.5"
700-
dependencies = [
701-
"cfg-if",
702-
"libc",
703-
"rustc-std-workspace-alloc",
704-
"rustc-std-workspace-core",
705-
]
706-
707685
[[package]]
708686
name = "stdarch-gen-arm"
709687
version = "0.1.0"
@@ -756,7 +734,6 @@ dependencies = [
756734
"core_arch",
757735
"quickcheck",
758736
"rand",
759-
"std_detect",
760737
]
761738

762739
[[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: 12 additions & 4 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,8 +562,12 @@ 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-
// best move at the root node, best score elsewhere
562-
if _ply == 0 { bm } else { bs }
565+
//best move at the root node, best score elsewhere
566+
if _ply == 0 {
567+
bm
568+
} else {
569+
bs
570+
}
563571
}
564572

565573
/// 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)