code_abinash 0.1.0

A collection of utilities to make performing certain calculations more convenient.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use code_abinash::{add_one, mix, PrimaryColor, SecondaryColor};

fn main() {
    let num = 10;
    println!("{} + 1 = {}", num, add_one(num));

    let red = PrimaryColor::Red;
    let yellow = PrimaryColor::Yellow;
    let orange = mix(red, yellow);
    // If the color is orange print 'Orange' else print 'Not Orange'
    if let SecondaryColor::Orange = orange {
        println!("Orange");
    } else {
        println!("Not Orange");
    }
}