File tree Expand file tree Collapse file tree 2 files changed +2
-8
lines changed
Expand file tree Collapse file tree 2 files changed +2
-8
lines changed Original file line number Diff line number Diff line change @@ -16,11 +16,7 @@ fn get_or_intern(pool: &Pool, s: &str) -> u32 {
1616 let idx = pool. iter ( ) . position ( |( _, x) | x == s) ;
1717 match idx {
1818 Some ( idx) => idx as u32 ,
19- None => {
20- let idx = pool. count ( ) ;
21- pool. push ( s. to_owned ( ) ) ;
22- idx as u32
23- }
19+ None => pool. push ( s. to_owned ( ) ) as u32 ,
2420 }
2521}
2622
Original file line number Diff line number Diff line change 5252 /// Add a file to the database, returning the handle that can be used to
5353 /// refer to it again.
5454 pub fn add ( & self , name : Name , source : Source ) -> usize {
55- let file_id = self . files . count ( ) ;
56- self . files . push ( files:: SimpleFile :: new ( name, source) ) ;
57- file_id
55+ self . files . push ( files:: SimpleFile :: new ( name, source) )
5856 }
5957
6058 /// Get the file corresponding to the given id.
You can’t perform that action at this time.
0 commit comments