From 2758e06374494cea79f4f9bbc0f60df2d3c1c8ac Mon Sep 17 00:00:00 2001 From: Rui <58332748+wodray@users.noreply.github.com> Date: Sun, 14 Jul 2024 18:36:00 +0800 Subject: [PATCH] remove unnecessary type conversions (#1411) --- codes/rust/chapter_computational_complexity/time_complexity.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/codes/rust/chapter_computational_complexity/time_complexity.rs b/codes/rust/chapter_computational_complexity/time_complexity.rs index 70d4510689..8fb4121a27 100644 --- a/codes/rust/chapter_computational_complexity/time_complexity.rs +++ b/codes/rust/chapter_computational_complexity/time_complexity.rs @@ -113,7 +113,7 @@ fn linear_log_recur(n: i32) -> i32 { return 1; } let mut count = linear_log_recur(n / 2) + linear_log_recur(n / 2); - for _ in 0..n as i32 { + for _ in 0..n { count += 1; } return count;