Fix builds.
This commit is contained in:
parent
51581cdef5
commit
5f09b5d9d9
@ -24,6 +24,7 @@ Potentially breaking changes
|
||||
Enhancements
|
||||
------------
|
||||
|
||||
* `Engine::new_raw` is now `const` and runs very fast, delaying all other initialization until first use.
|
||||
* The functions `min` and `max` are added for numbers.
|
||||
* Range cases in `switch` statements now also match floating-point and decimal values. In order to support this, however, small numeric ranges cases are no longer unrolled.
|
||||
* Loading a module via `import` now gives the module access to the current scope, including variables and constants defined inside.
|
||||
|
@ -326,7 +326,11 @@ impl Engine {
|
||||
&self,
|
||||
string: impl AsRef<str> + Into<ImmutableString>,
|
||||
) -> ImmutableString {
|
||||
locked_write(&self.interned_strings).get(string)
|
||||
if let Some(ref interner) = self.interned_strings {
|
||||
locked_write(interner).get(string)
|
||||
} else {
|
||||
string.into()
|
||||
}
|
||||
}
|
||||
|
||||
/// _(internals)_ Get an interned [string][ImmutableString].
|
||||
|
Loading…
Reference in New Issue
Block a user