-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Breaking Changes to be idiomatic #115
See #108 for some justification of why we're making breaking changes ### Update constructors with idiomatic names Rename `::create` to `::new`, and `::create_with_capacity` to `::with_container_capacity` Idiomatic rust uses `StructName::new()` as the default construction function, and functions to create with configuration are named like `StructName::with_x(x)` (see e.g. `Vec::new()` and `Vec::with_capacity()` ### Add a `From` impl for `&[u32]` and `[u32; N]` Still leave `Bitmap::of`: There are type inference difficulties with `Bitmap::from(&[1, 2, 3])` (because the type is inferred to `&[i32]`) or `Bitmap::from(&vec)` (because `From<&Vec<u32>>` isn't implemented) ### Add some benchmarks for the ways of batch-constructing a bitmap Some benchmarks for adding individually, vs from an iterator, etc. ### Implement FromIterator/Extend in terms of `add_bulk` It can be a pretty big waste of memory to collect into a Vec in order to construct from an iterator, and it's only a tiny bit faster.
- Loading branch information
Showing
16 changed files
with
299 additions
and
184 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
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
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
Oops, something went wrong.