signal: Ctrl+C example: clarify control flow after receiving Ctrl+C: unreachable!()

This commit is contained in:
Jules Kerssemakers 2017-06-07 21:20:51 +02:00 committed by Carl Lerche
parent f5eadc74f1
commit da47cfbd58

View File

@ -23,4 +23,7 @@ fn main() {
println!("Ctrl-C received!");
Ok(())
})).unwrap();
println!("this won't be printed, because the received Ctrl+C will also kill the program");
unreachable!();
}