@@ -43,10 +43,9 @@ fn get_delete_data_from_response(
4343 response_data : delete_service_mutation:: ResponseData ,
4444 graph : String ,
4545) -> Result < RawMutationResponse , RoverClientError > {
46- let service_data = match response_data. service {
47- Some ( data) => Ok ( data) ,
48- None => Err ( RoverClientError :: NoService { graph } ) ,
49- } ?;
46+ let service_data = response_data
47+ . service
48+ . ok_or ( RoverClientError :: NoService { graph } ) ?;
5049
5150 Ok ( service_data. remove_implementing_service_and_trigger_composition )
5251}
@@ -76,7 +75,7 @@ mod tests {
7675 use super :: * ;
7776 use serde_json:: json;
7877
79- type RawCompositionErrrors = delete_service_mutation:: DeleteServiceMutationServiceRemoveImplementingServiceAndTriggerCompositionErrors ;
78+ type RawCompositionErrors = delete_service_mutation:: DeleteServiceMutationServiceRemoveImplementingServiceAndTriggerCompositionErrors ;
8079
8180 #[ test]
8281 fn get_delete_data_from_response_works ( ) {
@@ -100,11 +99,11 @@ mod tests {
10099
101100 let expected_response = RawMutationResponse {
102101 errors : vec ! [
103- Some ( RawCompositionErrrors {
102+ Some ( RawCompositionErrors {
104103 message: "wow" . to_string( ) ,
105104 } ) ,
106105 None ,
107- Some ( RawCompositionErrrors {
106+ Some ( RawCompositionErrors {
108107 message: "boo" . to_string( ) ,
109108 } ) ,
110109 ] ,
@@ -117,11 +116,11 @@ mod tests {
117116 fn build_response_works_with_successful_responses ( ) {
118117 let response = RawMutationResponse {
119118 errors : vec ! [
120- Some ( RawCompositionErrrors {
119+ Some ( RawCompositionErrors {
121120 message: "wow" . to_string( ) ,
122121 } ) ,
123122 None ,
124- Some ( RawCompositionErrrors {
123+ Some ( RawCompositionErrors {
125124 message: "boo" . to_string( ) ,
126125 } ) ,
127126 ] ,
0 commit comments