Remove newtype wrapper `RelativeTime` for `jiff::Timestamp`

finchie
Aug 26, 2024, 7:00 AM
CFJKYXUX4FF2DVAOJ3RRTI4JZPP5GMMDTJCEYM2IS57SCRKGZI6AC

Dependencies

  • [2] 3NMKD6I5 Refactor `Localize` trait to use `std::io::Write`
  • [3] 7U2DXFMP Refactor `fluent_embed::Localize` to support overriding locales
  • [4] IRW6JACS Implement `Localize` for `RelativeTime`
  • [5] BFL2Y7GN Add relative timestamps using `jiff` and `icu_relativetime`
  • [*] HHJDRLLN Create `fluent_embed_runtime` crate

Change contents

  • edit in fluent_embed/src/time.rs at line 16
    [3.647][3.647:748]()
    /// A time relative to the system clock (either past or future)
    pub struct RelativeTime(Timestamp);
  • replacement in fluent_embed/src/time.rs at line 17
    [3.749][3.749:769](),[3.2812][3.769:846](),[3.769][3.769:846](),[3.846][3.23:25](),[3.25][3.954:955](),[3.954][3.954:955](),[3.955][2.3794:3849]()
    impl RelativeTime {
    pub fn new(timestamp: Timestamp) -> Self {
    Self(timestamp)
    }
    }
    impl<W: std::io::Write> Localize<W> for RelativeTime {
    [3.749]
    [2.3849]
    impl<W: std::io::Write> Localize<W> for Timestamp {
  • replacement in fluent_embed/src/time.rs at line 36
    [3.1272][3.1272:1299]()
    .since(self.0)
    [3.1272]
    [3.1299]
    .since(*self)
  • replacement in fluent_embed/src/time.rs at line 70
    [3.2611][3.2611:2638]()
    .since(self.0)
    [3.2611]
    [3.2638]
    .since(*self)
  • edit in fluent_embed/src/lib.rs at line 10
    [7.382]
    [7.382]
    pub use jiff::Timestamp;