Skip to content

Commit

Permalink
collections::bitv: Implement several methods for Bitv and BitvSet
Browse files Browse the repository at this point in the history
On Bitv:
   - Add .push() and .pop() which take and return bool, respectively
   - Add .truncate() which truncates a Bitv to a specific length
   - Add .grow() which grows a Bitv by a specific length
   - Add .reserve() which grows the underlying storage to be able to hold
     a specified number of bits without resizing
   - Implement FromIterator<Vec<bool>>
   - Implement Extendable<bool>
   - Implement Collection
   - Implement Mutable
   - Remove .from_bools() since FromIterator<Vec<bool>> now accomplishes this.
   - Remove .assign() since Clone::clone_from() accomplishes this.

On BitvSet:
   - Add .reserve() which grows the underlying storage to be able to hold
     a specified number of bits without resizing
   - Add .get_ref() and .get_mut_ref() to return references to the
     underlying Bitv
  • Loading branch information
apoelstra committed Jul 2, 2014
1 parent b5c54df commit 9eb81ed
Showing 1 changed file with 295 additions and 41 deletions.

0 comments on commit 9eb81ed

Please sign in to comment.