rust_is_even

Crates.iorust_is_even
lib.rsrust_is_even
version0.1.0
sourcesrc
created_at2021-04-11 07:35:56.853957
updated_at2021-04-11 07:35:56.853957
descriptionUnofficial wrapper crate of [isevenapi](https://isevenapi.xyz/).
homepage
repositoryhttps://github.com/daikw/rust_is_even
max_upload_size
id381936
size28,702
Daiki Watanabe (daikw)

documentation

README

rust_is_even

Check if interger is even using isevenapi.

Usage

// Cargo.toml: 'tokio = { version = "1.4.0", features = ["full"] }'

extern crate rust_is_even as ie;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {    
    let n: u32 = 42;
    if ie::is_even(n).await? {
        println!("{} is even", n);
    } else {
        println!("{} is odd", n);
    }    

    Ok(())
}
Commit count: 6

cargo fmt