From 7f0bf4b81b83c8e118085a324278c7e50c78f259 Mon Sep 17 00:00:00 2001 From: Trivernis Date: Fri, 3 Apr 2020 15:29:24 +0200 Subject: [PATCH] Increase the number to its max value in the end to ensure it uses the right type --- src/to_bench.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/to_bench.rs b/src/to_bench.rs index 37f428b..8db1f31 100644 --- a/src/to_bench.rs +++ b/src/to_bench.rs @@ -21,6 +21,8 @@ pub fn summation_to(end: T) -> T { res = res + i; i = i + T::one(); } + res = T::max_value(); + res }