#replace #blocks #bad #unsafe #name #macro #friendlier

trust_me_its_safe

A macro that replaces unsafe blocks with a friendlier name to not sound as bad

1 unstable release

0.1.0 Dec 23, 2022

#847 in Audio

Download history 8/week @ 2024-02-26 15/week @ 2024-04-01 50/week @ 2024-04-15

65 downloads per month

Apache-2.0

2KB

trust_me_its_safe

A rust macro to replace your unsafe blocks with a more friendlier (and sarcastic) name in order to not look as bad.

Usage Examples

Instead of

fn main() {
    let mut x = 2.;
    let pointer = &mut x as *mut f64;

    unsafe {
        *pointer = 6.3;
    }

    println!("{}", x);
}

just use

fn main() {
    let mut x = 2.;
    let pointer = &mut x as *mut f64;

    trust_me_its_safe! {{
        *pointer = 6.3;
    }}

    println!("{}", x);
}

No runtime deps