Crates.io | is_positive |
lib.rs | is_positive |
version | 0.1.338 |
source | src |
created_at | 2024-09-10 15:03:59.214058 |
updated_at | 2024-09-10 15:10:30.149422 |
description | A simple Rust library to check if any non-ZST is positive |
homepage | |
repository | https://github.com/LilDojd/is_positive |
max_upload_size | |
id | 1370479 |
size | 92,008 |
Welcome to the cutting-edge, totally-not-cursed Rust library that pushes the boundaries of what's possible (and probably what's sensible) in Rust programming!
Works only in nightly Rust due to use of generic_const_exprs
.
Checkout cve-rs to find out why this works.
Here's a quick example of how to use our groundbreaking is_positive
function:
use is_positive::is_positive;
fn main() {
let number = 42;
let mood = "ecstatic";
println!("Is 42 positive? {}", is_positive(number)); // true
println!("Is 'ecstatic' positive? {}", is_positive(mood)); // true
}
:rotating_light: NEVER, and I mean NEVER use this in your code. The transmute
relies on compiler bug and WILL produce UB :rotating_light:
transmute
: Transmute any type to any other type without unsafe code! What could go wrong?is_positive
: Determine if any type is positive using cutting-edge AI technology (results may vary).Contributions are welcome! Please note that all pull requests must be accompanied by a notarized statement declaring that you understand the cosmic consequences of your actions.
The Rust compiler for not completely giving up on us.