Skip to content

Commit f028b9a

Browse files
authored
More non_exhaustive (#6408)
Fixes #4673 <!-- Thank you for your pull request to ICU4X! Reminder: try to use [Conventional Comments](https://conventionalcomments.org/) to make comments clearer. Please see https://github.com/unicode-org/icu4x/blob/main/CONTRIBUTING.md for general information on contributing to ICU4X. -->
1 parent 4e1dc7c commit f028b9a

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

components/time/src/zone/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ pub mod models {
131131
/// A time zone containing a time zone ID and optional offset.
132132
#[derive(Debug, PartialEq, Eq)]
133133
#[non_exhaustive]
134-
pub enum Base {}
134+
pub struct Base;
135135

136136
impl private::Sealed for Base {}
137137
impl TimeZoneModel for Base {
@@ -142,7 +142,7 @@ pub mod models {
142142
/// A time zone containing a time zone ID, optional offset, and local time.
143143
#[derive(Debug, PartialEq, Eq)]
144144
#[non_exhaustive]
145-
pub enum AtTime {}
145+
pub struct AtTime;
146146

147147
impl private::Sealed for AtTime {}
148148
impl TimeZoneModel for AtTime {
@@ -153,7 +153,7 @@ pub mod models {
153153
/// A time zone containing a time zone ID, optional offset, local time, and zone variant.
154154
#[derive(Debug, PartialEq, Eq)]
155155
#[non_exhaustive]
156-
pub enum Full {}
156+
pub struct Full;
157157

158158
impl private::Sealed for Full {}
159159
impl TimeZoneModel for Full {

ffi/capi/src/timezone.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,9 @@ pub mod ffi {
7676

7777
#[diplomat::opaque]
7878
#[diplomat::rust_link(icu::time::TimeZoneInfo, Struct)]
79-
#[diplomat::rust_link(icu::time::zone::models::AtTime, Enum, hidden)]
80-
#[diplomat::rust_link(icu::time::zone::models::Base, Enum, hidden)]
81-
#[diplomat::rust_link(icu::time::zone::models::Full, Enum, hidden)]
79+
#[diplomat::rust_link(icu::time::zone::models::AtTime, Struct, hidden)]
80+
#[diplomat::rust_link(icu::time::zone::models::Base, Struct, hidden)]
81+
#[diplomat::rust_link(icu::time::zone::models::Full, Struct, hidden)]
8282
pub struct TimeZoneInfo {
8383
pub(crate) time_zone_id: icu_time::TimeZone,
8484
pub(crate) offset: Option<icu_time::zone::UtcOffset>,

0 commit comments

Comments
 (0)