This repository was archived by the owner on Dec 29, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +5
-6
lines changed Expand file tree Collapse file tree 3 files changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,6 @@ extern crate env_logger;
2
2
extern crate rls_analysis;
3
3
4
4
use rls_analysis:: { AnalysisHost , AnalysisLoader , SearchDirectory } ;
5
- use std:: collections:: HashMap ;
6
5
use std:: env;
7
6
use std:: path:: { Path , PathBuf } ;
8
7
@@ -43,7 +42,7 @@ fn main() {
43
42
std:: process:: exit ( 1 ) ;
44
43
}
45
44
let loader = Loader :: new ( PathBuf :: from ( env:: args ( ) . nth ( 1 ) . unwrap ( ) ) ) ;
46
- let crates = rls_analysis:: read_analysis_from_files ( & loader, HashMap :: new ( ) , & [ ] ) ;
45
+ let crates = rls_analysis:: read_analysis_from_files ( & loader, Default :: default ( ) , & [ ] ) ;
47
46
48
47
for krate in & crates {
49
48
println ! ( "Crate {:?} data version {:?}" , krate. id, krate. analysis. version) ;
Original file line number Diff line number Diff line change @@ -239,7 +239,7 @@ impl<L: AnalysisLoader> AnalysisHost<L> {
239
239
}
240
240
241
241
pub fn get_def ( & self , id : Id ) -> AResult < Def > {
242
- self . with_analysis ( |a| a. with_defs ( id, std :: clone :: Clone :: clone) )
242
+ self . with_analysis ( |a| a. with_defs ( id, Clone :: clone) )
243
243
}
244
244
245
245
pub fn goto_def ( & self , span : & Span ) -> AResult < Span > {
@@ -434,7 +434,7 @@ impl<L: AnalysisLoader> AnalysisHost<L> {
434
434
435
435
/// Search for a symbol name, returning a list of def_ids for that name.
436
436
pub fn search_for_id ( & self , name : & str ) -> AResult < Vec < Id > > {
437
- self . with_analysis ( |a| Some ( a. with_def_names ( name, std :: clone :: Clone :: clone) ) )
437
+ self . with_analysis ( |a| Some ( a. with_def_names ( name, Clone :: clone) ) )
438
438
}
439
439
440
440
pub fn symbols ( & self , file_name : & Path ) -> AResult < Vec < SymbolResult > > {
Original file line number Diff line number Diff line change @@ -50,9 +50,9 @@ impl Crate {
50
50
51
51
/// Reads raw analysis data for non-blacklisted crates from files in directories
52
52
/// pointed by `loader`.
53
- pub fn read_analysis_from_files < L : AnalysisLoader , S : std :: hash :: BuildHasher + Default > (
53
+ pub fn read_analysis_from_files < L : AnalysisLoader > (
54
54
loader : & L ,
55
- crate_timestamps : HashMap < PathBuf , SystemTime , S > ,
55
+ crate_timestamps : HashMap < PathBuf , SystemTime > ,
56
56
crate_blacklist : Blacklist ,
57
57
) -> Vec < Crate > {
58
58
let mut result = vec ! [ ] ;
You can’t perform that action at this time.
0 commit comments