blob: 7bd3f214b9adcfb573cbd4d63295f6031ec30bb9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
extern crate regex;
use regex::Regex;
use std::io::BufReader;
use std::io::prelude::*;
use std::fs::File;
fn main() {
println!("Hello, world!");
}
fn read_file() -> Vec<String> {
let file = BufReader::new(File::open("input.txt").unwrap());
file.lines()
.map(|line| line.unwrap().trim().to_string())
.filter(|line| line.len() > 0)
.collect()
}
|