Fix sync feature.

This commit is contained in:
Stephen Chung
2020-08-08 17:04:21 +08:00
parent 5a1a141ce3
commit f68c5a699d
4 changed files with 8 additions and 8 deletions

View File

@@ -338,7 +338,7 @@ impl<'a> Scope<'a> {
/// ```
pub fn get_value<T: Variant + Clone>(&self, name: &str) -> Option<T> {
self.get_entry(name)
.and_then(|Entry { value, .. }| value.get_inner_clone().try_cast())
.and_then(|Entry { value, .. }| value.flatten_clone().try_cast())
}
/// Update the value of the named entry.
@@ -441,7 +441,7 @@ impl<'a> Scope<'a> {
/// ```
pub fn iter(&self) -> impl Iterator<Item = (&str, Dynamic)> {
self.iter_raw()
.map(|(name, value)| (name, value.get_inner_clone()))
.map(|(name, value)| (name, value.flatten_clone()))
}
/// Get an iterator to entries in the Scope.