src: use core instead of std in some places, aiming for no_std compat

This commit is contained in:
2024-12-01 16:17:51 +01:00
parent 0f73b42818
commit 36aead9762
6 changed files with 15 additions and 15 deletions

View File

@ -1,7 +1,7 @@
use std::fmt::{Debug, Formatter};
use std::ops::{Mul, Sub, Add};
use core::fmt::{Debug, Formatter};
use core::ops::{Mul, Sub, Add};
use num::{One, pow, integer::Roots};
use std::cmp::{min, max};
use core::cmp::{min, max};
pub trait CoordinateOp: PartialOrd + PartialEq + Sub + Clone + Mul + Copy + One + Add + Eq + Debug where
Self: Sub<Output=Self> {
@ -21,7 +21,7 @@ pub struct Coordinates<S: CoordinateSpace> {
}
impl<S: CoordinateSpace> Debug for Coordinates<S> where S::Data: Debug {
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
fn fmt(&self, f: &mut Formatter<'_>) -> core::fmt::Result {
f.debug_tuple("@")
.field(&self.x)
.field(&self.y)