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
parent 7dc9818dca
commit efef5a6e6a
+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!();
}