• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

lennart-k / ical-rs / #73

12 Jan 2026 01:50PM UTC coverage: 77.771% (-0.03%) from 77.802%
#73

Pull #2

lennart-k
IcalCalendarObjectBuilder: Make attributes public
Pull Request #2: Major overhaul

908 of 1184 new or added lines in 30 files covered. (76.69%)

32 existing lines in 10 files now uncovered.

1221 of 1570 relevant lines covered (77.77%)

2.77 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

90.91
/src/parser/property/calscale.rs
1
use crate::{
2
    parser::{ParseProp, ParserError},
3
    property::ContentLine,
4
    types::Value,
5
};
6
use std::collections::HashMap;
7

8
#[derive(Debug, Clone, PartialEq, Eq)]
9
pub enum Calscale {
10
    Gregorian,
11
}
12

13
impl Value for Calscale {
14
    fn value_type(&self) -> Option<&'static str> {
1✔
15
        Some("TEXT")
16
    }
17

18
    fn value(&self) -> String {
1✔
19
        "GREGORIAN".to_owned()
1✔
20
    }
21
}
22

23
impl ParseProp for Calscale {
24
    fn parse_prop(
1✔
25
        prop: &ContentLine,
26
        _timezones: Option<&HashMap<String, Option<chrono_tz::Tz>>>,
27
        _default_type: &str,
28
    ) -> Result<Self, ParserError> {
29
        match prop
1✔
30
            .value
31
            .as_deref()
1✔
32
            .unwrap_or_default()
1✔
33
            .to_uppercase()
1✔
34
            .as_str()
1✔
35
        {
36
            "GREGORIAN" => Ok(Self::Gregorian),
2✔
NEW
37
            _ => Err(ParserError::InvalidCalscale),
×
38
        }
39
    }
40
}
41
super::property!("CALSCALE", "TEXT", IcalCALSCALEProperty, Calscale);
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc