refactor: Use iter::Repeat instead of Iterator.cycle