File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,8 @@ mod marks;
1111mod doc_tests;
1212pub mod ast_transform;
1313
14+ use std:: cmp:: Ordering ;
15+
1416use either:: Either ;
1517use ra_db:: FileRange ;
1618use ra_ide_db:: RootDatabase ;
@@ -85,13 +87,12 @@ pub fn resolved_assists(db: &RootDatabase, range: FileRange) -> Vec<ResolvedAssi
8587 Assist :: Resolved { assist } => assist,
8688 Assist :: Unresolved { .. } => unreachable ! ( ) ,
8789 } )
88- . collect ( ) ;
90+ . collect :: < Vec < _ > > ( ) ;
8991 sort_assists ( & mut a) ;
9092 a
9193}
9294
93- fn sort_assists ( assists : & mut Vec < ResolvedAssist > ) {
94- use std:: cmp:: Ordering ;
95+ fn sort_assists ( assists : & mut [ ResolvedAssist ] ) {
9596 assists. sort_by ( |a, b| match ( a. get_first_action ( ) . target , b. get_first_action ( ) . target ) {
9697 ( Some ( a) , Some ( b) ) => a. len ( ) . cmp ( & b. len ( ) ) ,
9798 ( Some ( _) , None ) => Ordering :: Less ,
You can’t perform that action at this time.
0 commit comments