fix IndexMap remove() deprecation warning (#3430)
This commit is contained in:
parent
0fb2a67484
commit
196c144d8f
@ -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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user