async fn fetch_meetings_events(config: &Config) -> WorkEvents<Meeting> {
    if let Some(ics_file) = &config.calendar_ics {
        let parser = CalendarParser::new(ics_file);
        let calendar = parser.parse().await.unwrap();
        let meetings =
            Vec::<Meeting>::from_icalendar(&calendar, &config.date, &config.project_prefixes, true);

        if meetings.is_empty() {
            info!("No meeting found for the day.");
            return WorkEvents::new();
        }

        let events = meetings.to_sorted_events(
            &0,
            &0,
            "",
            &config.date,
            config.meeting_default_issue.as_ref(),
        );

        if log_enabled!(Info) {
            info!("Found {} meetings:", events.len());
            for event in events.iter() {
                info!(
                    "- {}: {} / time: {}",
                    event.key,
                    event.event.title,
                    format_duration(&event.duration)
                );
            }
        }

        return events;
    }

    WorkEvents::new()
}
// TODO: ignore meetings already logged in tempo
ignore meetings already logged in tempo
ignore meetings already logged in tempo
async fn fetch_meetings_events(config: &Config) -> WorkEvents<Meeting> {
    if let Some(ics_file) = &config.calendar_ics {
        let parser = CalendarParser::new(ics_file);
        let calendar = parser.parse().await.unwrap();
        let meetings =
            Vec::<Meeting>::from_icalendar(&calendar, &config.date, &config.project_prefixes, true);
        if meetings.is_empty() {
            info!("No meeting found for the day.");
            return WorkEvents::new();
        }
        let events = meetings.to_sorted_events(
            &0,
            &0,
            "",
            &config.date,
            config.meeting_default_issue.as_ref(),
        );
        if log_enabled!(Info) {
            info!("Found {} meetings:", events.len());
            for event in events.iter() {
                info!(
                    "- {}: {} / time: {}",
                    event.key,
                    event.event.title,
                    format_duration(&event.duration)
                );
            }
        }
        return events;
    }
    WorkEvents::new()
}
async fn fetch_meetings_events ( config : & Config ) -> WorkEvents < Meeting > { if let Some ( ics_file ) = & config . calendar_ics { let parser = CalendarParser :: new ( ics_file ) ; let calendar = parser . parse ( ) . await . unwrap ( ) ; let meetings = Vec :: < Meeting > :: from_icalendar ( & calendar , & config . date , & config . project_prefixes , true ) ; if meetings . is_empty ( ) { info ! ( " " ) ; return WorkEvents :: new ( ) ; } let events = meetings . to_sorted_events ( & 0 , & 0 , " " , & config . date , config . meeting_default_issue . as_ref ( ) , ) ; if log_enabled ! ( Info ) { info ! ( " " events len ( ) ) ; for event in events . iter ( ) { info ! ( " " event key event event title format_duration ( event duration ) ) ; } } return events ; } WorkEvents :: new ( ) }
TODO: ignore meetings already logged in tempo
TODO : ignore meetings already logged in tempo
config
&Config
config
&Config