Skip to content

Commit

Permalink
bigint module for rustpython-format
Browse files Browse the repository at this point in the history
  • Loading branch information
youknowone committed Dec 27, 2023
1 parent a398b11 commit 4efe36b
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
4 changes: 4 additions & 0 deletions format/src/bigint.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#[cfg(feature = "malachite-bigint")]
pub use malachite_bigint::{BigInt, Sign};
#[cfg(feature = "num-bigint")]
pub use num_bigint::{BigInt, Sign};
5 changes: 1 addition & 4 deletions format/src/cformat.rs
Original file line number Diff line number Diff line change
@@ -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::{
Expand Down
5 changes: 1 addition & 4 deletions format/src/format.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
1 change: 1 addition & 0 deletions format/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
mod bigint;
pub mod cformat;
mod format;

Expand Down

0 comments on commit 4efe36b

Please sign in to comment.