Skip to content

daikw/rust_is_even

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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(())
}

About

Unofficial wrapper crate of isevenapi

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages