bigint module for rustpython-format

This commit is contained in:
Jeong YunWon 2023-12-28 01:09:35 +09:00 committed by Harsha Teja Kanna
parent d71e528deb
commit 635eb4516d
4 changed files with 7 additions and 8 deletions

4
format/src/bigint.rs Normal file
View file

@ -0,0 +1,4 @@
#[cfg(feature = "malachite-bigint")]
pub use malachite_bigint::{BigInt, Sign};
#[cfg(feature = "num-bigint")]
pub use num_bigint::{BigInt, Sign};

View file

@ -1,10 +1,7 @@
//! Implementation of Printf-Style string formatting
//! as per the [Python Docs](https://docs.python.org/3/library/stdtypes.html#printf-style-string-formatting).
use crate::bigint::{BigInt, Sign};
use bitflags::bitflags;
#[cfg(feature = "malachite-bigint")]
use malachite_bigint::{BigInt, Sign};
#[cfg(feature = "num-bigint")]
use num_bigint::{BigInt, Sign};
use num_traits::Signed;
use rustpython_literal::{float, format::Case};
use std::{

View file

@ -1,8 +1,5 @@
use crate::bigint::{BigInt, Sign};
use itertools::{Itertools, PeekingNext};
#[cfg(feature = "malachite-bigint")]
use malachite_bigint::{BigInt, Sign};
#[cfg(feature = "num-bigint")]
use num_bigint::{BigInt, Sign};
use num_traits::FromPrimitive;
use num_traits::{cast::ToPrimitive, Signed};
use rustpython_literal::float;

View file

@ -1,3 +1,4 @@
mod bigint;
pub mod cformat;
mod format;