File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -321,11 +321,11 @@ impl BitVec<u32> {
321321 /// }
322322 /// ```
323323 #[ inline]
324- pub fn from_elem ( nbits : usize , bit : bool ) -> Self {
325- let nblocks = blocks_for_bits :: < B > ( nbits ) ;
324+ pub fn from_elem ( len : usize , bit : bool ) -> Self {
325+ let nblocks = blocks_for_bits :: < B > ( len ) ;
326326 let mut bit_vec = BitVec {
327327 storage : vec ! [ if bit { !B :: zero( ) } else { B :: zero( ) } ; nblocks] ,
328- nbits,
328+ nbits : len ,
329329 } ;
330330 bit_vec. fix_last_block ( ) ;
331331 bit_vec
@@ -339,9 +339,9 @@ impl BitVec<u32> {
339339 /// It is important to note that this function does not specify the
340340 /// *length* of the returned bitvector, but only the *capacity*.
341341 #[ inline]
342- pub fn with_capacity ( nbits : usize ) -> Self {
342+ pub fn with_capacity ( capacity : usize ) -> Self {
343343 BitVec {
344- storage : Vec :: with_capacity ( blocks_for_bits :: < B > ( nbits ) ) ,
344+ storage : Vec :: with_capacity ( blocks_for_bits :: < B > ( capacity ) ) ,
345345 nbits : 0 ,
346346 }
347347 }
You can’t perform that action at this time.
0 commit comments