cin 0.2.0

cin - a utility that simplifies command-line input in Rust, especially mimicking C++-style input
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use cin::cin::cin;

#[test]
fn check_u8() {
    let expected = 127u8;
    let got: u8 = cin("Enter a number: ");
    assert_eq!(got, expected);
}

#[test]
fn check_string_input() {
    let expected = String::from("london");
    let got = cin::<String>("Enter a string: ");
    assert_eq!(got, expected);
}