suicide-rs

Crates.iosuicide-rs
lib.rssuicide-rs
version1.0.0
created_at2025-04-08 04:40:46.868415+00
updated_at2025-04-08 04:40:46.868415+00
descriptionA super simple crate for printing an error message when something terrible goes wrong and nothing can be done to recover.
homepagehttps://github.com/BulmasArmpitSweat/suicide-rs.git
repositoryhttps://github.com/BulmasArmpitSweat/suicide-rs.git
max_upload_size
id1625013
size15,832
(BulmasArmpitSweat)

documentation

README

suicide-rs

A super simple crate for printing an error message when something terrible goes wrong and nothing can be done to recover.

Example

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.

Commit count: 0

cargo fmt