The loop symbol for the raft node threads is difficult to notice and can be easily overlooked:
let handle = thread::spawn(move || loop {
thread::sleep(Duration::from_millis(10));
...
For better readability, we should move the loop to the next line:
let handle = thread::spawn(move || {
loop {
thread::sleep(Duration::from_millis(10));
...