use std::fs; fn main(){ let file_contents = fs::read_to_string("Cargo.toml").expect("open file failed"); println!("content={}",file_contents); println!("hello world"); }