mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
misc: clippy: add map_unwrap_or
Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de> On-behalf-of: SAP philipp.schuster@sap.com
This commit is contained in:
committed by
Rob Bradford
parent
dda89d7027
commit
d2b19bb969
@@ -1161,7 +1161,7 @@ fn main() {
|
||||
if let Some(api_client::Error::ServerResponse(status_code, body)) =
|
||||
error.downcast_ref::<api_client::Error>()
|
||||
{
|
||||
let body = body.as_ref().map(|body| body.as_str()).unwrap_or("");
|
||||
let body = body.as_ref().map_or("", |body| body.as_str());
|
||||
|
||||
// Retrieve the list of error messages back.
|
||||
let lines: Vec<&str> = match serde_json::from_str(body) {
|
||||
|
||||
Reference in New Issue
Block a user