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 {
110
110
if resp. status ( ) == 202u16 {
111
111
let headers = resp. headers ( ) ;
112
112
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 (
114
114
ErrorKind :: Other ,
115
115
"invalid characters in operation-location path" ,
116
116
) ,
Original file line number Diff line number Diff line change @@ -202,8 +202,7 @@ impl DeviceUpdateClient {
202
202
} ) )
203
203
}
204
204
OperationStatus :: Succeeded => return Ok ( update_operation) ,
205
- OperationStatus :: NotStarted => continue ,
206
- OperationStatus :: Running => continue ,
205
+ OperationStatus :: NotStarted | OperationStatus :: Running => continue ,
207
206
OperationStatus :: Undefined => {
208
207
return Err ( Error :: with_message ( ErrorKind :: Other , || {
209
208
format ! (
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ mod tests {
17
17
pub ( crate ) fn mock_client ( server_url : String ) -> crate :: client:: DeviceUpdateClient {
18
18
crate :: client:: DeviceUpdateClient {
19
19
device_update_url : url:: Url :: parse ( & server_url) . unwrap ( ) ,
20
- endpoint : "" . to_string ( ) ,
20
+ endpoint : String :: new ( ) ,
21
21
token_credential : AutoRefreshingTokenCredential :: new ( Arc :: new ( MockCredential ) ) ,
22
22
}
23
23
}
You can’t perform that action at this time.
0 commit comments