1 // ignore-cloudabi no std::fs support
4 #![deny(unused_imports)]
7 use std::io::{BufRead, BufReader, Read};
8 //~^ ERROR unused import: `BufRead`
10 pub fn read_from_file(path: &str) {
11 let file = File::open(&path).unwrap();
12 let mut reader = BufReader::new(file);
13 let mut s = String::new();
14 reader.read_to_string(&mut s).unwrap();
17 pub fn read_lines(s: &str) {
18 for _line in s.lines() {