From b5e022eaa10f9fffd8a7de484553359e69c37a71 Mon Sep 17 00:00:00 2001 From: alice Date: Wed, 7 Feb 2024 16:12:50 +0100 Subject: [PATCH] fix building jaq-interpret tests on 32-bit platforms (#159) 4999950000 overflows a usize (u32) --- jaq-interpret/src/rc_lazy_list.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jaq-interpret/src/rc_lazy_list.rs b/jaq-interpret/src/rc_lazy_list.rs index 0342de963..20b707675 100644 --- a/jaq-interpret/src/rc_lazy_list.rs +++ b/jaq-interpret/src/rc_lazy_list.rs @@ -50,7 +50,7 @@ fn drop() { let list = List::from_iter(0..100_000); // clone() ensures that we keep a copy of the whole list around // sum() then evaluates the whole list - assert_eq!(list.clone().sum::(), 4999950000); + assert_eq!(list.clone().sum::(), 4999950000); // at the end, a long, fully evaluated list is dropped, // which would result in a stack overflow without the custom `Drop` impl std::mem::drop(list);