This repository was archived by the owner on Jul 27, 2023. It is now read-only.
File tree 4 files changed +15
-7
lines changed
4 files changed +15
-7
lines changed Original file line number Diff line number Diff line change @@ -12,5 +12,6 @@ rustpython-literal = { workspace = true }
12
12
13
13
bitflags = " 2.3.1"
14
14
itertools = " 0.10.5"
15
- malachite-bigint = { workspace = true }
16
15
num-traits = { workspace = true }
16
+ num-bigint = { workspace = true , optional = true }
17
+ malachite-bigint = { workspace = true , optional = true }
Original file line number Diff line number Diff line change 1
1
//! Implementation of Printf-Style string formatting
2
2
//! as per the [Python Docs](https://docs.python.org/3/library/stdtypes.html#printf-style-string-formatting).
3
3
use bitflags:: bitflags;
4
- use malachite_bigint:: { BigInt , Sign } ;
5
4
use num_traits:: Signed ;
6
5
use rustpython_literal:: { float, format:: Case } ;
7
6
use std:: {
@@ -10,6 +9,8 @@ use std::{
10
9
str:: FromStr ,
11
10
} ;
12
11
12
+ use crate :: bigint:: { BigInt , Sign } ;
13
+
13
14
#[ derive( Debug , PartialEq ) ]
14
15
pub enum CFormatErrorType {
15
16
UnmatchedKeyParentheses ,
Original file line number Diff line number Diff line change 1
1
use itertools:: { Itertools , PeekingNext } ;
2
- use malachite_bigint:: { BigInt , Sign } ;
3
- use num_traits:: FromPrimitive ;
4
- use num_traits:: { cast:: ToPrimitive , Signed } ;
2
+
3
+ use num_traits:: { cast:: ToPrimitive , FromPrimitive , Signed } ;
5
4
use rustpython_literal:: float;
6
5
use rustpython_literal:: format:: Case ;
7
6
use std:: ops:: Deref ;
8
7
use std:: { cmp, str:: FromStr } ;
9
8
9
+ use crate :: bigint:: { BigInt , Sign } ;
10
+
10
11
trait FormatParse {
11
12
fn parse ( text : & str ) -> ( Option < Self > , & str )
12
13
where
Original file line number Diff line number Diff line change 1
- pub mod cformat;
2
- mod format;
1
+ #[ cfg( feature = "malachite-bigint" ) ]
2
+ pub use malachite_bigint as bigint;
3
+ #[ cfg( feature = "num-bigint" ) ]
4
+ pub use num_bigint as bigint;
3
5
4
6
pub use crate :: format:: * ;
7
+
8
+ pub mod cformat;
9
+ mod format;
You can’t perform that action at this time.
0 commit comments