Skip to content

Commit

Permalink
Merge pull request #42 from primenumber/apply-rustfmt
Browse files Browse the repository at this point in the history
Apply rustfmt
  • Loading branch information
primenumber authored Apr 2, 2024
2 parents f76e2bf + ada721a commit 48ea40e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
9 changes: 6 additions & 3 deletions src/engine/board.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#[cfg(test)]
mod test;
#[cfg(target_feature = "neon")]
use std::arch::aarch64::*;
use crate::engine::bits::*;
use crate::engine::hand::*;
use anyhow::Result;
use clap::ArgMatches;
#[cfg(target_feature = "neon")]
use std::arch::aarch64::*;
use std::cmp::min;
use std::fmt;
use std::io::{BufWriter, Write};
Expand Down Expand Up @@ -55,7 +55,10 @@ fn smart_upper_bit(x: u64x4) -> u64x4 {
}
}

#[cfg(not(any(target_feature = "neon", all(target_feature = "avx512cd", target_feature = "avx512vl"))))]
#[cfg(not(any(
target_feature = "neon",
all(target_feature = "avx512cd", target_feature = "avx512vl")
)))]
fn smart_upper_bit(mut x: u64x4) -> u64x4 {
x |= x >> u64x4::from_array([8, 1, 7, 9]);
x |= x >> u64x4::from_array([16, 2, 14, 18]);
Expand Down
4 changes: 2 additions & 2 deletions src/record.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ impl Record {
for i in 0..(l / 2) {
let h = Hand::from_str(&record_str[(2 * i)..(2 * i + 2)])?;
hands.push(h);
board = board.play_hand(h).ok_or(UnmovableError{})?;
board = board.play_hand(h).ok_or(UnmovableError {})?;
}
let score = if let Some(score) = splitted.get(1) {
score.parse().unwrap()
Expand All @@ -52,7 +52,7 @@ impl Record {
};
for &h in &self.hands {
res.push((board, h, score));
board = board.play_hand(h).ok_or(UnmovableError{})?;
board = board.play_hand(h).ok_or(UnmovableError {})?;
score = -score;
}
res.push((board, Hand::Pass, score));
Expand Down

0 comments on commit 48ea40e

Please sign in to comment.