diff options
| author | Jacob Hummer <jcbhmr@outlook.com> | 2024-02-20 04:48:32 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-02-20 10:48:32 +0000 |
| commit | 196c144d8f108634b41b54d0d0c10317f154d197 (patch) | |
| tree | 536d5ed71723990403991104215b2fcb5c1ad23d | |
| parent | 0fb2a674841882bac80ea44e7aae1684a4289f6a (diff) | |
fix IndexMap remove() deprecation warning (#3430)
| -rw-r--r-- | crates/typst/src/foundations/dict.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/crates/typst/src/foundations/dict.rs b/crates/typst/src/foundations/dict.rs index 59dd85c7..06c8f0e4 100644 --- a/crates/typst/src/foundations/dict.rs +++ b/crates/typst/src/foundations/dict.rs @@ -92,7 +92,9 @@ impl Dict { /// Remove the value if the dictionary contains the given key. pub fn take(&mut self, key: &str) -> StrResult<Value> { - Arc::make_mut(&mut self.0).remove(key).ok_or_else(|| missing_key(key)) + Arc::make_mut(&mut self.0) + .shift_remove(key) + .ok_or_else(|| missing_key(key)) } /// Whether the dictionary contains a specific key. |
