File tree Expand file tree Collapse file tree 3 files changed +3
-4
lines changed Expand file tree Collapse file tree 3 files changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -110,7 +110,7 @@ impl DeviceUpdateClient {
110110 if resp. status ( ) == 202u16 {
111111 let headers = resp. headers ( ) ;
112112 return match headers. get ( "operation-location" ) {
113- Some ( location) => location. to_str ( ) . map ( |x| x . to_string ( ) ) . context (
113+ Some ( location) => location. to_str ( ) . map ( ToString :: to_string) . context (
114114 ErrorKind :: Other ,
115115 "invalid characters in operation-location path" ,
116116 ) ,
Original file line number Diff line number Diff line change @@ -202,8 +202,7 @@ impl DeviceUpdateClient {
202202 } ) )
203203 }
204204 OperationStatus :: Succeeded => return Ok ( update_operation) ,
205- OperationStatus :: NotStarted => continue ,
206- OperationStatus :: Running => continue ,
205+ OperationStatus :: NotStarted | OperationStatus :: Running => continue ,
207206 OperationStatus :: Undefined => {
208207 return Err ( Error :: with_message ( ErrorKind :: Other , || {
209208 format ! (
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ mod tests {
1717 pub ( crate ) fn mock_client ( server_url : String ) -> crate :: client:: DeviceUpdateClient {
1818 crate :: client:: DeviceUpdateClient {
1919 device_update_url : url:: Url :: parse ( & server_url) . unwrap ( ) ,
20- endpoint : "" . to_string ( ) ,
20+ endpoint : String :: new ( ) ,
2121 token_credential : AutoRefreshingTokenCredential :: new ( Arc :: new ( MockCredential ) ) ,
2222 }
2323 }
You can’t perform that action at this time.
0 commit comments