diff options
Diffstat (limited to 'test.rs')
-rw-r--r-- | test.rs | 23 |
1 files changed, 23 insertions, 0 deletions
@@ -0,0 +1,23 @@ +/* +testing comments +/* /* /* /* /* hello */ */ */ */ */ +yay +*/ +use std::fs::File; +use std::io::{Result, BufRead, BufReader}; +fn main() -> Result<()> { + let file = File::open("test.rs")?; + let mut reader = BufReader::new(file); + loop { + let mut line = String::new(); + if reader.read_line(&mut line)? == 0 { + // reached end of file + break; + } + print!("{}", line); + } + print!(" + string + "); + Ok(()) +} |