Skip to content

Commit

Permalink
Arc
Browse files Browse the repository at this point in the history
  • Loading branch information
sffc committed Dec 19, 2023
1 parent 245d442 commit ab39def
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 26 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion provider/datagen/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ proc-macro2 = {version = "1", optional = true }

# Other external dependencies
displaydoc = { version = "0.2.3", default-features = false }
elsa = "1.9"
elsa = "1.10"
itertools = "0.10"
log = "0.4"
memchr = "2.5.0"
Expand Down
24 changes: 1 addition & 23 deletions provider/datagen/src/provider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -310,27 +310,7 @@ pub struct SourceData {
#[cfg(feature = "legacy_api")]
pub(crate) collations: Vec<String>,
pub(crate) supported_locales_cache_vec:
FrozenMapThrowawayClone<DataKey, Box<Result<Vec<DataLocale>, DataError>>>,
}

pub(crate) struct FrozenMapThrowawayClone<K, V>(pub(crate) FrozenMap<K, V>);

impl<K, V> Default for FrozenMapThrowawayClone<K, V> {
fn default() -> Self {
Self(FrozenMap::new())
}
}

impl<K, V> Clone for FrozenMapThrowawayClone<K, V> {
fn clone(&self) -> Self {
Default::default()
}
}

impl<K, V> Debug for FrozenMapThrowawayClone<K, V> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "FrozenMap")
}
Arc<FrozenMap<DataKey, Box<Result<Vec<DataLocale>, DataError>>>>,
}

#[cfg(feature = "legacy_api")]
Expand Down Expand Up @@ -523,7 +503,6 @@ where
#[allow(deprecated)] // SourceData
self.source
.supported_locales_cache_vec
.0
.insert_with(M::KEY, || Box::from(self.supported_locales_impl()))
.as_ref()
.cloned()
Expand All @@ -534,7 +513,6 @@ where
#[allow(deprecated)] // SourceData
self.source
.supported_locales_cache_vec
.0
.insert_with(M::KEY, || Box::from(self.supported_locales_impl()))
.as_ref()
.map_err(|e| *e)
Expand Down

0 comments on commit ab39def

Please sign in to comment.