File tree Expand file tree Collapse file tree 3 files changed +15
-6
lines changed Expand file tree Collapse file tree 3 files changed +15
-6
lines changed Original file line number Diff line number Diff line change @@ -162,8 +162,10 @@ where
162162    H :  BuildHasher , 
163163{ 
164164    /// Creates an empty `DoublePriorityQueue` with the specified hasher 
165- pub  fn  with_hasher ( hash_builder :  H )  -> Self  { 
166-         Self :: with_capacity_and_hasher ( 0 ,  hash_builder) 
165+ pub  const  fn  with_hasher ( hash_builder :  H )  -> Self  { 
166+         Self  { 
167+             store :  Store :: with_hasher ( hash_builder) , 
168+         } 
167169    } 
168170
169171    /// Creates an empty `DoublePriorityQueue` with the specified capacity and hasher 
Original file line number Diff line number Diff line change @@ -153,8 +153,10 @@ where
153153    H :  BuildHasher , 
154154{ 
155155    /// Creates an empty `PriorityQueue` with the specified hasher 
156- pub  fn  with_hasher ( hash_builder :  H )  -> Self  { 
157-         Self :: with_capacity_and_hasher ( 0 ,  hash_builder) 
156+ pub  const  fn  with_hasher ( hash_builder :  H )  -> Self  { 
157+         Self  { 
158+             store :  Store :: with_hasher ( hash_builder) , 
159+         } 
158160    } 
159161
160162    /// Creates an empty `PriorityQueue` with the specified capacity and hasher 
Original file line number Diff line number Diff line change @@ -134,8 +134,13 @@ where
134134    H :  BuildHasher , 
135135{ 
136136    /// Creates an empty `Store` with the specified hasher 
137- pub  fn  with_hasher ( hash_builder :  H )  -> Self  { 
138-         Self :: with_capacity_and_hasher ( 0 ,  hash_builder) 
137+ pub  const  fn  with_hasher ( hash_builder :  H )  -> Self  { 
138+         Self  { 
139+             map :  IndexMap :: with_hasher ( hash_builder) , 
140+             heap :  Vec :: new ( ) , 
141+             qp :  Vec :: new ( ) , 
142+             size :  0 , 
143+         } 
139144    } 
140145
141146    /// Creates an empty `Store` with the specified capacity and hasher 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments