Skip to content

Commit

Permalink
🔧 Fix jupyter display format
Browse files Browse the repository at this point in the history
  • Loading branch information
oovm committed Jun 19, 2024
1 parent 725a877 commit d9d1dc6
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions projects/nyar-number/src/integer/from.rs
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
use super::*;

impl FromStr for NyarInteger {
type Err = NyarError;
type Err = SyntaxError;

fn from_str(s: &str) -> Result<Self, Self::Err> {
Ok(BigInt::from_str(s)?.into())
}
}

impl Num for NyarInteger {
type FromStrRadixErr = NyarError;
type FromStrRadixErr = SyntaxError;

fn from_str_radix(str: &str, radix: u32) -> Result<Self, Self::FromStrRadixErr> {
Ok(Self::from(BigInt::from_str_radix(str, radix)?))
Expand Down
3 changes: 2 additions & 1 deletion projects/nyar-number/src/integer/jupyter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,5 @@ impl Executed for NyarInteger {
};
Value::String(buffer)
}
}
}

4 changes: 2 additions & 2 deletions projects/nyar-number/src/integer/mod.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use crate::unsigned::NyarDigits;
use num::{bigint::Sign, BigInt, BigUint, Num, One, Signed, ToPrimitive, Zero};
use nyar_error::NyarError;
use nyar_error::{ SyntaxError};
use shredder::{
marker::{GcDrop, GcSafe},
Scan, Scanner,
Expand All @@ -10,6 +10,7 @@ use std::{
ops::{Add, Div, Mul, Neg, Rem, Sub},
str::FromStr,
};
use crate::NyarDecimal;

mod arith;
#[cfg(feature = "serde")]
Expand All @@ -36,7 +37,6 @@ impl Default for NyarInteger {
}
}

impl FromS

unsafe impl GcSafe for NyarInteger {}

Expand Down
2 changes: 1 addition & 1 deletion projects/nyar-number/src/number/arith.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use super::*;

use crate::NyarReal::{Rational, Decimal, Infinity};
impl One for NyarReal {
fn one() -> Self {
Rational(NyarRational::one())
Expand Down

0 comments on commit d9d1dc6

Please sign in to comment.