Skip to content
This repository was archived by the owner on Mar 25, 2023. It is now read-only.

Commit 36756bb

Browse files
committed
code reformatted based on clippy
1 parent 8db8892 commit 36756bb

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

src/commands/serve.rs

+12-6
Original file line numberDiff line numberDiff line change
@@ -229,8 +229,8 @@ mod controller {
229229
} else {
230230
panic!("Invalid git url for the package {}", package_name);
231231
}
232-
},
233-
false => panic!("get-package api success status returned false!!")
232+
}
233+
false => panic!("get-package api success status returned false!!"),
234234
}
235235

236236
// Once the dependencies are resolved for the package
@@ -256,15 +256,15 @@ mod controller {
256256
let response = match http::_get(url).await {
257257
Ok(some_response) => some_response,
258258
Err(e) => {
259-
panic!("failed to fetch data, error: {}", e.to_string())
259+
panic!("failed to fetch data, error: {}", e)
260260
}
261261
};
262262

263263
match serde_json::from_str(response.as_str()) {
264264
Ok(v) => Ok(v),
265265
Err(e) => panic!(
266266
"failed parsing json from response text, error: {}",
267-
e.to_string()
267+
e
268268
),
269269
}
270270
}
@@ -289,7 +289,10 @@ mod controller {
289289

290290
let url = match url::Url::parse(controller_api.as_str()) {
291291
Ok(safe_url) => safe_url,
292-
Err(e) => panic!("Invalid get-package API endpoint, Parse error: {}",e.to_string()),
292+
Err(e) => panic!(
293+
"Invalid get-package API endpoint, Parse error: {}",
294+
e
295+
),
293296
};
294297

295298
make_get_request(url).await
@@ -312,7 +315,10 @@ mod controller {
312315

313316
let url = match url::Url::parse(controller_api.as_str()) {
314317
Ok(safe_url) => safe_url,
315-
Err(e) => panic!("Invalid fpm_ready API endpoint, Parse error: {}",e.to_string()),
318+
Err(e) => panic!(
319+
"Invalid fpm_ready API endpoint, Parse error: {}",
320+
e
321+
),
316322
};
317323

318324
// This request should be put request for fpm_ready API to update the instance status to ready

0 commit comments

Comments
 (0)