You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

10 lines
384 B
Rust

use std::fs;
fn main() {
let byte_arr = fs::read("stats3.txt").expect("Unable to read file into bytes");
println!(
"Value read from file into bytes is {}",
String::from_utf8(byte_arr).unwrap()
);
let string1 = fs::read_to_string("stats3.txt").expect("Unable to read file into string");
println!("Value read from file into string is {}", string1);
}