From 5668f36b1dc0766c431a54c795bc0877dc53123e Mon Sep 17 00:00:00 2001 From: Bruce Mitchener Date: Fri, 6 Dec 2024 08:39:06 +0700 Subject: [PATCH] Use `shift_remove` with `IndexMap` This fixes a deprecation warning as the `remove` method had been deprecated in favor of either `swap_remove` or `shift_remove`. It seems appropriate to use `shift_remove` here to preserve ordering. --- src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index 9229481..9598150 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -228,7 +228,7 @@ impl PrefixMapping { /// /// * [`PrefixMapping::add_prefix()`] pub fn remove_prefix(&mut self, prefix: &str) { - self.mapping.remove(prefix); + self.mapping.shift_remove(prefix); } /// Expand a CURIE, returning a complete IRI.