From 053f81c7613a3c49e42435790a8a047e4df2e68e Mon Sep 17 00:00:00 2001 From: Gurwinder Singh Date: Fri, 17 Jul 2020 07:41:45 +0530 Subject: [PATCH] spack: remove_item is deprecated (#881) --- spack/src/bundler/chunk/merge.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/spack/src/bundler/chunk/merge.rs b/spack/src/bundler/chunk/merge.rs index 4bebd86c029e..5f177526400d 100644 --- a/spack/src/bundler/chunk/merge.rs +++ b/spack/src/bundler/chunk/merge.rs @@ -93,7 +93,10 @@ impl Bundler<'_> { info.id, info.fm.name, src.module_id, src.src.value ) })?; - targets.remove_item(&info.id); + + if let Some(pos) = targets.iter().position(|x| *x == info.id) { + targets.remove(pos); + } if imported.is_es6 { //{