about summary refs log tree commit diff
path: root/library/stdarch/examples/connect5.rs
diff options
context:
space:
mode:
authorJakub Beránek <berykubik@gmail.com>2025-07-13 13:08:17 +0200
committerJakub Beránek <berykubik@gmail.com>2025-07-22 20:22:16 +0200
commit608297247a776a32c4aca08f1784caca8a3c33e8 (patch)
tree6a1798428355a65b0ec3d47954e1f006f2013d95 /library/stdarch/examples/connect5.rs
parentffa97a647e3786add894093aa2cc7561c7c64607 (diff)
downloadrust-608297247a776a32c4aca08f1784caca8a3c33e8.tar.gz
rust-608297247a776a32c4aca08f1784caca8a3c33e8.zip
Remove `std_detect` from stdarch examples
Diffstat (limited to 'library/stdarch/examples/connect5.rs')
-rw-r--r--library/stdarch/examples/connect5.rs16
1 files changed, 12 insertions, 4 deletions
diff --git a/library/stdarch/examples/connect5.rs b/library/stdarch/examples/connect5.rs
index 1d8e0f0990a..371b28552b3 100644
--- a/library/stdarch/examples/connect5.rs
+++ b/library/stdarch/examples/connect5.rs
@@ -40,9 +40,13 @@ use std::cmp;
 use std::time::Instant;
 
 #[cfg(target_arch = "x86")]
-use {core_arch::arch::x86::*, std_detect::is_x86_feature_detected};
+use core_arch::arch::x86::*;
 #[cfg(target_arch = "x86_64")]
-use {core_arch::arch::x86_64::*, std_detect::is_x86_feature_detected};
+use core_arch::arch::x86_64::*;
+#[cfg(target_arch = "x86")]
+use std::is_x86_feature_detected;
+#[cfg(target_arch = "x86_64")]
+use std::is_x86_feature_detected;
 
 // types
 
@@ -558,8 +562,12 @@ fn search(pos: &Pos, alpha: i32, beta: i32, depth: i32, _ply: i32) -> i32 {
     assert_ne!(bm, MOVE_NONE);
     assert!(bs >= -EVAL_INF && bs <= EVAL_INF);
 
-    // best move at the root node, best score elsewhere
-    if _ply == 0 { bm } else { bs }
+    //best move at the root node, best score elsewhere
+    if _ply == 0 {
+        bm
+    } else {
+        bs
+    }
 }
 
 /// Evaluation function: give different scores to different patterns after a fixed depth.