Minor refactor (inlining)

This commit is contained in:
George Thomas 2025-12-18 13:00:55 +00:00
parent dc36ba47ff
commit bb57673f8a

View File

@ -57,9 +57,7 @@ fn is_repetition_2(n: usize) -> bool {
fn is_repetition_n(n: usize) -> bool {
let n = n.to_string();
let l = n.len();
let d = l / 2;
(1..(d + 1)).any(|i| equal_chunks(&n, i))
(1..(n.len() / 2 + 1)).any(|i| equal_chunks(&n, i))
}
fn equal_chunks(n: &String, i: usize) -> bool {