Skip to content

Commit b013988

Browse files
mrewoolfg
authored andcommitted
Remove unused TryFrom
1 parent a7a68b9 commit b013988

File tree

1 file changed

+0
-22
lines changed

1 file changed

+0
-22
lines changed

src/parser.rs

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -46,28 +46,6 @@ impl ParseState {
4646
}
4747
}
4848

49-
impl TryFrom<Timeline> for ParseState {
50-
type Error = anyhow::Error;
51-
52-
fn try_from(timeline: Timeline) -> Result<Self> {
53-
let mut state = ParseState::default();
54-
for contribution in timeline.contributions {
55-
let date = contribution.date;
56-
let date = state.parse_date(&date)?;
57-
let count = contribution.count;
58-
59-
if let Some(date) = date {
60-
// Kinda ineffective to call these update functions in a loop
61-
for _ in 0..count {
62-
state.update_years(date);
63-
state.update_days(date);
64-
}
65-
}
66-
}
67-
Ok(state)
68-
}
69-
}
70-
7149
/// Backfill missing days with zero commits
7250
fn backfill(year: i32, days: &mut HashMap<NaiveDate, usize>) {
7351
for d in NaiveDate::from_ymd(year, 1, 1).iter_days() {

0 commit comments

Comments
 (0)