removed dependency on std

This commit is contained in:
2025-06-25 08:50:32 +08:00
parent f50e741929
commit 3cfbe4d87a
2 changed files with 3 additions and 2 deletions

View File

@@ -1,4 +1,4 @@
//#![no_std]
#![no_std]
mod board;
pub mod draughts;
pub mod position;

View File

@@ -3,11 +3,12 @@ use core::ops::Add;
use core::ops::Div;
use core::ops::Mul;
use core::ops::Sub;
#[derive(Debug, PartialEq, Eq, Clone, Copy)]
pub struct Position((u8, u8));
impl Display for Position {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
write!(f, "({}, {})", self.row(), self.col())
}
}