Fix compiling for all features.

This commit is contained in:
Stephen Chung
2020-04-28 19:39:28 +08:00
parent d3a97dc86b
commit 6351c07bc6
5 changed files with 8 additions and 9 deletions

View File

@@ -87,10 +87,10 @@ def_package!(crate:BasicTimePackage:"Basic timing utilities.", lib, {
#[cfg(not(feature = "unchecked"))]
{
if seconds > (MAX_INT as u64) {
return Err(EvalAltResult::ErrorArithmetic(
return Err(Box::new(EvalAltResult::ErrorArithmetic(
format!("Integer overflow for timestamp.elapsed(): {}", seconds),
Position::none(),
));
)));
}
}
return Ok(seconds as INT);