From e394824bf3ec25d04633ea0a383a1df3f87992e4 Mon Sep 17 00:00:00 2001 From: Stephen Chung Date: Tue, 21 Apr 2020 00:24:25 +0800 Subject: [PATCH] Fixes. --- src/packages/math_basic.rs | 4 ++-- src/packages/time_basic.rs | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/packages/math_basic.rs b/src/packages/math_basic.rs index 2d5f3fb8..ce96c806 100644 --- a/src/packages/math_basic.rs +++ b/src/packages/math_basic.rs @@ -13,9 +13,9 @@ use crate::parser::FLOAT; use crate::stdlib::{i32, i64, ops::Deref}; #[cfg(feature = "only_i32")] -const MAX_INT: INT = i32::MAX; +pub const MAX_INT: INT = i32::MAX; #[cfg(not(feature = "only_i32"))] -const MAX_INT: INT = i64::MAX; +pub const MAX_INT: INT = i64::MAX; pub struct BasicMathPackage(PackageLibrary); diff --git a/src/packages/time_basic.rs b/src/packages/time_basic.rs index d2a49aee..4f7881af 100644 --- a/src/packages/time_basic.rs +++ b/src/packages/time_basic.rs @@ -1,4 +1,5 @@ use super::logic::{eq, gt, gte, lt, lte, ne}; +use super::math_basic::MAX_INT; use super::{ create_new_package, reg_binary, reg_none, reg_unary, Package, PackageLibrary, PackageLibraryStore, @@ -6,6 +7,8 @@ use super::{ use crate::fn_register::{map_dynamic as map, map_result as result}; use crate::parser::INT; +use crate::result::EvalAltResult; +use crate::token::Position; use crate::stdlib::{ops::Deref, time::Instant};