diff options
author | Vincent Breitmoser <look@my.amazin.horse> | 2019-01-12 11:59:18 +0100 |
---|---|---|
committer | Vincent Breitmoser <look@my.amazin.horse> | 2019-01-12 11:59:18 +0100 |
commit | 2ebe3e92c1c3bb3a77efadd98a3df272034f139b (patch) | |
tree | 161a6b29b296fd8ab321c82792610aa1f4a5d2d0 /src/utils | |
parent | ba20020b63e14e200ea078e30b099e701fe05473 (diff) |
clean up prettyprint and fileutil
Diffstat (limited to 'src/utils')
-rw-r--r-- | src/utils/fileutil.rs | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/src/utils/fileutil.rs b/src/utils/fileutil.rs index 3caea18..a0d4741 100644 --- a/src/utils/fileutil.rs +++ b/src/utils/fileutil.rs @@ -79,11 +79,6 @@ pub fn read_calendar_from_path(path: &Path) -> Result<IcalVCalendar, String> { IcalVCalendar::from_str(&content, Some(path)) } -pub fn read_calendar_from_file(filepath: &str) -> Result<IcalVCalendar, String> { - let path = Path::new(filepath); - read_calendar_from_path(path) -} - pub fn read_calendars_from_files(files: &mut Iterator<Item = String>) -> Result<Vec<IcalVCalendar>, String> { files.map(|file| read_khaleesi_line(&file)).collect() } @@ -102,14 +97,6 @@ pub fn read_khaleesi_line(kline: &str) -> Result<IcalVCalendar, String> { } } -pub fn print_cals(cals: impl Iterator<Item = IcalVCalendar>) { - for cal in cals { - if let Some(line) = cal.get_principal_event().get_khaleesi_line() { - println!("{}", line); - } - } -} - #[cfg(test)] mod tests { use super::*; |