Skip to content

Commit

Permalink
Rename Cache to CachedTzInfo
Browse files Browse the repository at this point in the history
  • Loading branch information
pitdicker committed Mar 19, 2024
1 parent 0d235a4 commit c8343c7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/offset/local/unix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,13 @@ pub(super) fn offset_from_local_datetime(local: &NaiveDateTime) -> MappedLocalTi
})
}

struct Cache {
struct CachedTzInfo {
zone: Option<TimeZone>,
source: Source,
last_checked: SystemTime,
}

impl Cache {
impl CachedTzInfo {
fn tz_info(&mut self) -> &TimeZone {
self.refresh_cache();
self.zone.as_ref().unwrap()
Expand Down Expand Up @@ -193,8 +193,8 @@ impl Cache {
}

thread_local! {
static TZ_INFO: RefCell<Cache> = const { RefCell::new(
Cache {
static TZ_INFO: RefCell<CachedTzInfo> = const { RefCell::new(
CachedTzInfo {
zone: None,
source: Source::Uninitialized,
last_checked: SystemTime::UNIX_EPOCH,
Expand Down

0 comments on commit c8343c7

Please sign in to comment.