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

This commit is contained in:
Jules Kerssemakers
2018-09-10 11:30:00 -07:00
committed by Carl Lerche
parent f5eadc74f1
commit da47cfbd58
+3
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!();
}