clippy
This commit is contained in:
parent
176505b897
commit
be790c2d9e
@ -236,10 +236,10 @@ impl Board {
|
|||||||
self.place_unchecked(i, j, piece);
|
self.place_unchecked(i, j, piece);
|
||||||
let captured = self.propegate_from(i, j);
|
let captured = self.propegate_from(i, j);
|
||||||
if captured > 0 {
|
if captured > 0 {
|
||||||
return Ok(());
|
Ok(())
|
||||||
} else {
|
} else {
|
||||||
self.delete(i, j);
|
self.delete(i, j);
|
||||||
return Err("move would not propegate");
|
Err("move would not propegate")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -253,7 +253,7 @@ impl Board {
|
|||||||
let iterator = unsafe {
|
let iterator = unsafe {
|
||||||
// SAFETY! `propegate_from_dry` should not have overlapping chains
|
// SAFETY! `propegate_from_dry` should not have overlapping chains
|
||||||
// if overlapping chains were to exist, `self.place_unchecked` could collide with `self.get`
|
// if overlapping chains were to exist, `self.place_unchecked` could collide with `self.get`
|
||||||
(&*(self as *const Self)).propegate_from_dry(i, j, starting_color)
|
(*(self as *const Self)).propegate_from_dry(i, j, starting_color)
|
||||||
};
|
};
|
||||||
let mut count = 0;
|
let mut count = 0;
|
||||||
for &(i, j) in iterator {
|
for &(i, j) in iterator {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user