diff options
Diffstat (limited to 'rust/theBook/chapter-9-error-handling/panic')
-rw-r--r-- | rust/theBook/chapter-9-error-handling/panic/Cargo.toml | 8 | ||||
-rw-r--r-- | rust/theBook/chapter-9-error-handling/panic/src/main.rs | 5 |
2 files changed, 13 insertions, 0 deletions
diff --git a/rust/theBook/chapter-9-error-handling/panic/Cargo.toml b/rust/theBook/chapter-9-error-handling/panic/Cargo.toml new file mode 100644 index 0000000..f484c90 --- /dev/null +++ b/rust/theBook/chapter-9-error-handling/panic/Cargo.toml @@ -0,0 +1,8 @@ +[package] +name = "panic" +version = "0.1.0" +edition = "2021" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] diff --git a/rust/theBook/chapter-9-error-handling/panic/src/main.rs b/rust/theBook/chapter-9-error-handling/panic/src/main.rs new file mode 100644 index 0000000..a3bc2a7 --- /dev/null +++ b/rust/theBook/chapter-9-error-handling/panic/src/main.rs @@ -0,0 +1,5 @@ +fn main() { + let x = vec![1,2,3]; + + x[99]; +} |