summaryrefslogtreecommitdiff
path: root/dhall
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--dhall/src/syntax/core/expr.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/dhall/src/syntax/core/expr.rs b/dhall/src/syntax/core/expr.rs
index 7972283..5b9f401 100644
--- a/dhall/src/syntax/core/expr.rs
+++ b/dhall/src/syntax/core/expr.rs
@@ -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)?