Create Sample Rust CLI App

This commit is contained in:
GuilhermeWerner
2021-01-18 20:24:23 -03:00
parent d42b39065f
commit f34081ea8b
2 changed files with 33 additions and 0 deletions

20
Source/Console.rs Normal file
View File

@ -0,0 +1,20 @@
// Copyright (c) TribuFu 2015-2020. All Rights Reserved
#![allow(non_snake_case)]
use std::io::{self, Read};
fn main() {
println!("Hello World");
loop {
let mut input = String::new();
match io::stdin().read_line(&mut input) {
Ok(n) => {
print!("{}", input);
}
Err(error) => panic!("{}", error),
}
}
}