From: Ross Smyth Date: Sun, 17 Jul 2022 06:06:37 +0000 (-0400) Subject: Fixed imports num-rug-adapter X-Git-Tag: v0.9.1~3^2 X-Git-Url: https://git.sagredo.dev/?a=commitdiff_plain;h=577f85099dcf3f268debd1577275e89ba8797b27;p=scryer-prolog.git Fixed imports num-rug-adapter --- diff --git a/src/arena.rs b/src/arena.rs index 1c2999fc..2f9a6018 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 9ef796b5..830a7cce 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 0a141453..6c70df8b 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 8835c9ef..fa7b8859 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 ee08cec1..74f1b930 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;