~whynothugo/valarmd

5477d1b033318d7630499fce935c220697cb544d — Hugo Osvaldo Barrera 1 year, 7 months ago dd8bb3c
Minor linting tweaks
1 files changed, 3 insertions(+), 5 deletions(-)

M valarmd/src/main.rs
M valarmd/src/main.rs => valarmd/src/main.rs +3 -5
@@ 112,8 112,7 @@ fn parse_alarm(

    let trigger = trigger.ok_or(AlarmError::MissingTrigger)?;
    let description = description
        .map(|ps| ps.as_str())
        .unwrap_or("(no description)")
        .map_or("(no description)", ParseString::as_str)
        .to_string();

    // TODO: alarm.RELATED-TO


@@ 280,8 279,7 @@ fn extract_alarms(
        .properties
        .iter()
        .find(|prop| prop.name == "SUMMARY")
        .map(|s| s.val.as_str())
        .unwrap_or("No summary");
        .map_or("No summary", |s| s.val.as_str());
    let uid = component
        .properties
        .iter()


@@ 373,7 371,7 @@ fn main() {
                match &mut extract_alarms(&component, &filter, &timezones) {
                    Ok(new_alarms) => alarms.append(new_alarms),
                    Err(err) => {
                        error!("Failed to extract alarms from component: {}.", err)
                        error!("Failed to extract alarms from component: {}.", err);
                    }
                };
            }