diff options
Diffstat (limited to '')
-rw-r--r-- | dhall/src/syntax/core/expr.rs (renamed from dhall_syntax/src/core/expr.rs) | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/dhall_syntax/src/core/expr.rs b/dhall/src/syntax/core/expr.rs index 131f97e..5b9f401 100644 --- a/dhall_syntax/src/core/expr.rs +++ b/dhall/src/syntax/core/expr.rs @@ -1,6 +1,6 @@ -use crate::map::{DupTreeMap, DupTreeSet}; -use crate::visitor::{self, ExprFMutVisitor, ExprFVisitor}; -use crate::*; +use crate::syntax::map::{DupTreeMap, DupTreeSet}; +use crate::syntax::visitor::{self, ExprFMutVisitor, ExprFVisitor}; +use crate::syntax::*; pub type Integer = isize; pub type Natural = usize; @@ -351,7 +351,7 @@ impl<E> Expr<E> { } /// Add an isize to an usize -/// Panics on over/underflow +/// Returns `None` on over/underflow fn add_ui(u: usize, i: isize) -> Option<usize> { Some(if i < 0 { u.checked_sub(i.checked_neg()? as usize)? |