| Crates.io | suicide-rs |
| lib.rs | suicide-rs |
| version | 1.0.0 |
| created_at | 2025-04-08 04:40:46.868415+00 |
| updated_at | 2025-04-08 04:40:46.868415+00 |
| description | A super simple crate for printing an error message when something terrible goes wrong and nothing can be done to recover. |
| homepage | https://github.com/BulmasArmpitSweat/suicide-rs.git |
| repository | https://github.com/BulmasArmpitSweat/suicide-rs.git |
| max_upload_size | |
| id | 1625013 |
| size | 15,832 |
A super simple crate for printing an error message when something terrible goes wrong and nothing can be done to recover.
fn main() {
let val1: u8 = 10;
let val2: u8 = 20;
if (val1 + val2) != 35 {
suicide_rs::die!(EINVAL, "It is good day to be not dead!");
}
unreachable!("You are dead!");
}
This crate represents about half an hour of work, so this is really only relevant for when you're really lazy.