File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -53,21 +53,20 @@ pub trait FunctionLocations {
5353/// Stores FunctionLocations, returns a FunctionId
5454#[ derive( Clone ) ]
5555pub struct VecFunctionLocations {
56- // TODO switch to immutable vec
57- functions : Vec < FunctionLocation > ,
56+ functions : ImVector < FunctionLocation > ,
5857}
5958
6059impl VecFunctionLocations {
6160 /// Create a new tracker.
6261 pub fn new ( ) -> Self {
6362 Self {
64- functions : Vec :: with_capacity ( 8192 ) ,
63+ functions : ImVector :: new ( ) ,
6564 }
6665 }
6766
6867 /// Register a function, get back its id.
6968 pub fn add_function ( & mut self , filename : String , function_name : String ) -> FunctionId {
70- self . functions . push ( FunctionLocation {
69+ self . functions . push_back ( FunctionLocation {
7170 filename,
7271 function_name,
7372 } ) ;
You can’t perform that action at this time.
0 commit comments