Remove Dynamic::as_locked_immutable_string.
This commit is contained in:
@@ -1489,15 +1489,6 @@ impl Dynamic {
|
||||
_ => Err(self.type_name()),
|
||||
}
|
||||
}
|
||||
/// Cast the [`Dynamic`] as an [`ImmutableString`] and return it.
|
||||
/// Returns the name of the actual type if the cast fails.
|
||||
#[inline]
|
||||
pub(crate) fn as_locked_immutable_string<'a>(
|
||||
&'a self,
|
||||
) -> Result<impl Deref<Target = ImmutableString> + 'a, &'static str> {
|
||||
self.read_lock::<ImmutableString>()
|
||||
.ok_or_else(|| self.type_name())
|
||||
}
|
||||
/// Convert the [`Dynamic`] into a [`String`] and return it.
|
||||
/// If there are other references to the same string, a cloned copy is returned.
|
||||
/// Returns the name of the actual type if the cast fails.
|
||||
|
Reference in New Issue
Block a user