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

zbraniecki / icu4x / 6815798908

09 Nov 2023 05:17PM UTC coverage: 72.607% (-2.4%) from 75.01%
6815798908

push

github

web-flow
Implement `Any/BufferProvider` for some smart pointers (#4255)

Allows storing them as a `Box<dyn Any/BufferProvider>` without using a
wrapper type that implements the trait.

44281 of 60987 relevant lines covered (72.61%)

201375.86 hits per line

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

0.0
/components/timezone/src/error.rs
1
// This file is part of ICU4X. For terms of use, please see the file
2
// called LICENSE at the top level of the ICU4X source tree
3
// (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ).
4

5
use displaydoc::Display;
6
use icu_provider::DataError;
7

8
#[cfg(feature = "std")]
9
impl std::error::Error for TimeZoneError {}
10

11
/// A list of error outcomes for various operations in this module.
12
///
13
/// Re-exported as [`Error`](crate::Error).
14
#[derive(Display, Debug, Copy, Clone, PartialEq)]
×
15
#[non_exhaustive]
16
pub enum TimeZoneError {
17
    /// An input overflowed its range.
18
    #[displaydoc("GmtOffset must be within ±18:00:00")]
19
    OffsetOutOfBounds,
20
    /// The time zone offset was invalid.
21
    #[displaydoc("Failed to parse time-zone offset")]
22
    InvalidOffset,
23
    /// The data name checksums do not match (data from different sources?)
24
    #[displaydoc("Data checksums to not match (mismatched data sources?)")]
25
    MismatchedChecksums,
26
    /// An error originating inside of the [data provider](icu_provider).
27
    #[displaydoc("{0}")]
×
28
    Data(DataError),
×
29
}
30

31
impl From<DataError> for TimeZoneError {
32
    fn from(e: DataError) -> Self {
×
33
        TimeZoneError::Data(e)
×
34
    }
×
35
}
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

© 2025 Coveralls, Inc