You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(This issue is fixed by #44 -- but I wanted to explicitly file an issue in case others hit this.)
We are heavy users of MultiMap in Humility (thank you!), and we hit an issue where we panicked in MultiMap iteration on some archives for some operations. This is replicated with the following program:
use multimap::MultiMap;fnmain(){letmut m = MultiMap::new();
m.insert("foo",true);
m.insert("bar",true);
m.insert("baz",true);for(n, _)in m.iter(){println!("{n}");}
m.get_vec_mut("baz").expect("wat").pop();for(n, _)in m.iter(){println!("{n}");}}
This will die when run:
foo
bar
baz
foo
bar
thread 'main' panicked at /home/bmc/.cargo/registry/src/index.crates.io-6f17d22bba15001f/multimap-0.8.3/src/lib.rs:822:46:
index out of bounds: the len is 0 but the index is 0
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
I have verified that #44 fixes this and results in the expected behavior -- so it would be great to get that merged. And thank you again for MultiMap!
Activity
havarnov commentedon Oct 23, 2023
Thanks for filing an issue. I'm sorry the PR have been in limbo for such a long time :/
havarnov commentedon Oct 23, 2023
Fixed in v0.9.1.