@@ -899,7 +899,7 @@ fn offset_to_position(text: &str, offset: usize) -> Position {
899899#[ cfg( test) ]
900900mod tests {
901901 use super :: * ;
902- use lsp_server:: { ErrorCode , RequestId , ResponseKind } ;
902+ use lsp_server:: { ErrorCode , RequestId } ;
903903 use lsp_types:: TextDocumentItem ;
904904 use std:: cell:: RefCell ;
905905 use std:: convert:: Infallible ;
@@ -937,11 +937,11 @@ mod tests {
937937 match & messages[ 0 ] {
938938 Message :: Response ( response) => {
939939 assert_eq ! ( response. id, RequestId :: from( 1 ) ) ;
940- match & response. response_kind {
941- ResponseKind :: Err { error } => {
940+ match & response. response_result {
941+ Err ( error) => {
942942 assert_eq ! ( error. code, ErrorCode :: MethodNotFound as i32 ) ;
943943 }
944- ResponseKind :: Ok { .. } => panic ! ( "expected an error response" ) ,
944+ Ok ( .. ) => panic ! ( "expected an error response" ) ,
945945 }
946946 }
947947 _ => panic ! ( "expected a Response message" ) ,
@@ -965,9 +965,9 @@ mod tests {
965965 match & messages[ 0 ] {
966966 Message :: Response ( response) => {
967967 assert_eq ! ( response. id, RequestId :: from( 2 ) ) ;
968- match & response. response_kind {
969- ResponseKind :: Ok { result } => assert_eq ! ( * result, Value :: Null ) ,
970- ResponseKind :: Err { .. } => panic ! ( "expected an ok response" ) ,
968+ match & response. response_result {
969+ Ok ( result) => assert_eq ! ( * result, Value :: Null ) ,
970+ Err ( .. ) => panic ! ( "expected an ok response" ) ,
971971 }
972972 }
973973 _ => panic ! ( "expected a Response message" ) ,
@@ -1050,8 +1050,8 @@ mod tests {
10501050 let messages = messages. into_inner ( ) ;
10511051 assert_eq ! ( messages. len( ) , 1 ) ;
10521052 match & messages[ 0 ] {
1053- Message :: Response ( response) => match & response. response_kind {
1054- ResponseKind :: Ok { result } => {
1053+ Message :: Response ( response) => match & response. response_result {
1054+ Ok ( result) => {
10551055 let symbols: Option < Vec < SymbolInformation > > =
10561056 from_value ( result. clone ( ) ) . unwrap ( ) ;
10571057 let symbols = symbols. unwrap ( ) ;
@@ -1063,7 +1063,7 @@ mod tests {
10631063 . starts_with( "making_coffee" ) )
10641064 ) ;
10651065 }
1066- ResponseKind :: Err { .. } => panic ! ( "expected an ok response" ) ,
1066+ Err ( .. ) => panic ! ( "expected an ok response" ) ,
10671067 } ,
10681068 _ => panic ! ( "expected a Response message" ) ,
10691069 }
0 commit comments