fix: Polishing code format on linearLogRecur, convert String type to string (#841)

This commit is contained in:
hpstory
2023-10-08 20:33:30 +08:00
committed by GitHub
parent 2bba70fd87
commit e03022d5fb
7 changed files with 8 additions and 16 deletions

View File

@ -111,8 +111,7 @@ fn linear_log_recur(n: f32) -> i32 {
if n <= 1.0 {
return 1;
}
let mut count = linear_log_recur(n / 2.0) +
linear_log_recur(n / 2.0);
let mut count = linear_log_recur(n / 2.0) + linear_log_recur(n / 2.0);
for _ in 0 ..n as i32 {
count += 1;
}