Returns n + 1.
use add_one::add_one;
fn main() {
let mut bytes = Vec::new();
match add_one("123".as_bytes(), &mut bytes) {
Ok(()) => println!("{}", std::str::from_utf8(&bytes).unwrap()),
Err(e) => {
eprintln!("Error: {}", e);
}
}
}
or
cargo install add-one
add-one 12
13