mirror of
https://github.com/RustPython/Parser.git
synced 2025-07-07 21:25:31 +00:00
bigint module for rustpython-format
This commit is contained in:
parent
d71e528deb
commit
635eb4516d
4 changed files with 7 additions and 8 deletions
4
format/src/bigint.rs
Normal file
4
format/src/bigint.rs
Normal 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};
|
|
@ -1,10 +1,7 @@
|
||||||
//! Implementation of Printf-Style string formatting
|
//! Implementation of Printf-Style string formatting
|
||||||
//! as per the [Python Docs](https://docs.python.org/3/library/stdtypes.html#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;
|
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 num_traits::Signed;
|
||||||
use rustpython_literal::{float, format::Case};
|
use rustpython_literal::{float, format::Case};
|
||||||
use std::{
|
use std::{
|
||||||
|
|
|
@ -1,8 +1,5 @@
|
||||||
|
use crate::bigint::{BigInt, Sign};
|
||||||
use itertools::{Itertools, PeekingNext};
|
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::FromPrimitive;
|
||||||
use num_traits::{cast::ToPrimitive, Signed};
|
use num_traits::{cast::ToPrimitive, Signed};
|
||||||
use rustpython_literal::float;
|
use rustpython_literal::float;
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
mod bigint;
|
||||||
pub mod cformat;
|
pub mod cformat;
|
||||||
mod format;
|
mod format;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue