diff options
author | Vincent Breitmoser <look@my.amazin.horse> | 2019-01-20 12:26:31 +0100 |
---|---|---|
committer | Vincent Breitmoser <look@my.amazin.horse> | 2019-01-20 12:26:31 +0100 |
commit | abac372c76be0c7be757de2f2f535d2c61d0d539 (patch) | |
tree | 73432b8a94a50ad172de5f74f858c0e27308560e /src/utils/fileutil.rs | |
parent | 8066036b6ef048ca1ae24f36db75029b6ac71a5f (diff) |
drop two unused methods from fileutil
Diffstat (limited to 'src/utils/fileutil.rs')
-rw-r--r-- | src/utils/fileutil.rs | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/src/utils/fileutil.rs b/src/utils/fileutil.rs index 2527b25..c60ac51 100644 --- a/src/utils/fileutil.rs +++ b/src/utils/fileutil.rs @@ -5,7 +5,6 @@ use std::{fs, io}; use std::fs::OpenOptions; use icalwrap::IcalVCalendar; -use khline::KhLine; pub fn file_iter(dir: &Path) -> impl Iterator<Item = PathBuf> { use walkdir::WalkDir; @@ -81,20 +80,6 @@ pub fn read_file_to_string(path: &Path) -> io::Result<String> { Ok(contents) } -pub fn read_calendar_from_path(path: &Path) -> io::Result<IcalVCalendar> { - trace!("Reading calendar from {}", path.to_string_lossy()); - let content = fs::read_to_string(path)?; - IcalVCalendar::from_str(&content, Some(path)) -} - -pub fn read_calendars_from_files(files: &mut Iterator<Item = String>) -> io::Result<Vec<IcalVCalendar>> { - files - .map(|line| line.parse::<KhLine>()) - .flatten() - .map(|khline| khline.to_cal()) - .collect() -} - #[cfg(test)] mod tests { use super::*; |