Skip to content

Commit ee906ef

Browse files
committed
refactoring
1 parent 2f8e4ed commit ee906ef

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/lib.rs

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
use std::{fs::File, io::BufReader};
2+
3+
pub fn open_input() -> BufReader<std::fs::File> {
4+
let file = File::open("inputs/input3.txt").expect("error opening file");
5+
BufReader::new(file)
6+
}
7+
8+
pub fn open_example() -> BufReader<std::fs::File> {
9+
let file = File::open("inputs/example3.txt").expect("error example");
10+
BufReader::new(file)
11+
}
12+
13+
// fn fetch_input() ->

0 commit comments

Comments
 (0)