Skip to content

Commit 92b72b1

Browse files
committed
indexmap: add another previously-failing assert.
1 parent a4bfe3e commit 92b72b1

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
4343
### Fixed
4444

4545
- Fixed a `dropping_references` warning in `LinearMap`.
46+
- Fixed IndexMap entry API returning wrong slot after an insert on vacant entry. (#360)
4647

4748
### Removed
4849

src/indexmap.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1469,7 +1469,7 @@ mod tests {
14691469
panic!("Entry found before insert");
14701470
}
14711471
Entry::Vacant(v) => {
1472-
v.insert(i).unwrap();
1472+
assert_eq!(i, *v.insert(i).unwrap());
14731473
}
14741474
}
14751475
}

0 commit comments

Comments
 (0)