-
Notifications
You must be signed in to change notification settings - Fork 147
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Problem: Porting some code that used HashMap's drain to OrderMap revealed a small API gap. Solution: Added a drain method, mostly mirroring what std::collections::HashMap offers except returning a standard Vec instead of a Drain. drain() provides an efficient way to remove all values without shrinking the capacity of the original OrderMap. Validation: Added unit tests and ported an existing HashMap::drain() user to OrderMap::drain
- Loading branch information
Steve Jenson
committed
Apr 20, 2017
1 parent
dc0be46
commit 0e18ddc
Showing
2 changed files
with
45 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
target | ||
Cargo.lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters