diff options
author | Joris | 2022-01-29 12:21:17 +0100 |
---|---|---|
committer | Joris | 2022-01-29 12:21:17 +0100 |
commit | dc0f32017cceabb6c683b6e1b4a2ae0248c37dbf (patch) | |
tree | 1d7f9a6217716c15147f82e61edc7e18e83af66c /src/deck.rs | |
parent | fe0d0196f133bd902b176aa02119b7f2a49ebc35 (diff) |
Read deck path from arguments as well
Diffstat (limited to 'src/deck.rs')
-rw-r--r-- | src/deck.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/deck.rs b/src/deck.rs index 384ce19..0fe8a7b 100644 --- a/src/deck.rs +++ b/src/deck.rs @@ -23,8 +23,8 @@ impl std::error::Error for ParseError { } -pub fn read() -> Result<Vec<Entry>> { - let file = File::open("deck")?; +pub fn read(deck: String) -> Result<Vec<Entry>> { + let file = File::open(deck)?; let reader = BufReader::new(file); let mut entries: Vec<Entry> = Vec::new(); |