add 01, 02
This commit is contained in:
Generated
+7
@@ -0,0 +1,7 @@
|
||||
# This file is automatically @generated by Cargo.
|
||||
# It is not intended for manual editing.
|
||||
version = 3
|
||||
|
||||
[[package]]
|
||||
name = "aoc"
|
||||
version = "0.1.0"
|
||||
@@ -0,0 +1,8 @@
|
||||
[package]
|
||||
name = "aoc"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
@@ -0,0 +1,8 @@
|
||||
use std::{fs, io::Read};
|
||||
|
||||
pub fn read_file(filename: &str) -> Vec<String> {
|
||||
let mut f = fs::File::open(filename).unwrap();
|
||||
let mut buffer = String::new();
|
||||
f.read_to_string(&mut buffer).unwrap();
|
||||
buffer.lines().map(|s| s.to_owned()).collect()
|
||||
}
|
||||
Reference in New Issue
Block a user