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

zbraniecki / icu4x / 11904027177

19 Nov 2024 12:33AM UTC coverage: 75.477% (+0.3%) from 75.174%
11904027177

push

github

web-flow
Move DateTimePattern into pattern module (#5834)

#1317

Also removes `NeoNeverMarker` and fixes #5689

258 of 319 new or added lines in 6 files covered. (80.88%)

6967 existing lines in 278 files now uncovered.

54522 of 72237 relevant lines covered (75.48%)

655305.49 hits per line

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

50.0
/utils/writeable/src/either.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 crate::*;
6
use ::either::Either;
7

8
/// A [`Writeable`] impl that delegates to one type or another type.
9
impl<W0, W1> Writeable for Either<W0, W1>
10
where
11
    W0: Writeable,
12
    W1: Writeable,
13
{
UNCOV
14
    fn write_to<W: fmt::Write + ?Sized>(&self, sink: &mut W) -> fmt::Result {
×
UNCOV
15
        match self {
×
UNCOV
16
            Either::Left(w) => w.write_to(sink),
×
UNCOV
17
            Either::Right(w) => w.write_to(sink),
×
18
        }
UNCOV
19
    }
×
20

21
    fn write_to_parts<S: PartsWrite + ?Sized>(&self, sink: &mut S) -> fmt::Result {
231✔
22
        match self {
231✔
23
            Either::Left(w) => w.write_to_parts(sink),
108✔
24
            Either::Right(w) => w.write_to_parts(sink),
123✔
25
        }
26
    }
231✔
27

28
    fn writeable_length_hint(&self) -> LengthHint {
29
        match self {
30
            Either::Left(w) => w.writeable_length_hint(),
31
            Either::Right(w) => w.writeable_length_hint(),
32
        }
33
    }
34

35
    fn write_to_string(&self) -> Cow<str> {
36
        match self {
37
            Either::Left(w) => w.write_to_string(),
38
            Either::Right(w) => w.write_to_string(),
39
        }
40
    }
41
}
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