Skip to content

Commit d098529

Browse files
committed
Remove std_detect from stdarch examples
1 parent 632cbbd commit d098529

File tree

4 files changed

+18
-30
lines changed

4 files changed

+18
-30
lines changed

Cargo.lock

Lines changed: 0 additions & 23 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

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

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.

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)