From 577f85099dcf3f268debd1577275e89ba8797b27 Mon Sep 17 00:00:00 2001 From: Ross Smyth Date: Sun, 17 Jul 2022 02:06:37 -0400 Subject: [PATCH] Fixed imports num-rug-adapter --- src/arena.rs | 4 ++-- src/machine/heap.rs | 2 +- src/parser/ast.rs | 2 +- src/parser/mod.rs | 3 ++- src/parser/parser.rs | 2 +- 5 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/arena.rs b/src/arena.rs index 1c2999fc3..2f9a60184 100644 --- a/src/arena.rs +++ b/src/arena.rs @@ -6,7 +6,7 @@ use crate::read::*; use modular_bitfield::prelude::*; use ordered_float::OrderedFloat; -use rug::{Integer, Rational}; +use crate::parser::rug::{Integer, Rational}; use std::alloc; use std::fmt; @@ -681,7 +681,7 @@ mod tests { use crate::machine::partial_string::*; use ordered_float::OrderedFloat; - use rug::{Integer, Rational}; + use crate::parser::rug::{Integer, Rational}; #[test] fn float_ptr_cast() { diff --git a/src/machine/heap.rs b/src/machine/heap.rs index 9ef796b50..830a7cce7 100644 --- a/src/machine/heap.rs +++ b/src/machine/heap.rs @@ -5,7 +5,7 @@ use crate::machine::partial_string::*; use crate::parser::ast::*; use crate::types::*; -use rug::{Integer, Rational}; +use crate::parser::rug::{Integer, Rational}; use std::convert::TryFrom; diff --git a/src/parser/ast.rs b/src/parser/ast.rs index 0a1414538..6c70df8ba 100644 --- a/src/parser/ast.rs +++ b/src/parser/ast.rs @@ -11,7 +11,7 @@ use std::ops::Neg; use std::rc::Rc; use std::vec::Vec; -use rug::{Integer, Rational}; +use crate::parser::rug::{Integer, Rational}; use fxhash::FxBuildHasher; use indexmap::IndexMap; diff --git a/src/parser/mod.rs b/src/parser/mod.rs index 8835c9efc..fa7b8859a 100644 --- a/src/parser/mod.rs +++ b/src/parser/mod.rs @@ -1,5 +1,6 @@ #[cfg(feature = "num-rug-adapter")] -use num_rug_adapter as rug; +pub use num_rug_adapter as rug; + #[cfg(feature = "rug")] pub use rug; diff --git a/src/parser/parser.rs b/src/parser/parser.rs index ee08cec1a..74f1b930e 100644 --- a/src/parser/parser.rs +++ b/src/parser/parser.rs @@ -4,7 +4,7 @@ use crate::parser::ast::*; use crate::parser::char_reader::*; use crate::parser::lexer::*; -use rug::ops::NegAssign; +use crate::parser::rug::ops::NegAssign; use std::cell::Cell; use std::mem;