use constant for error comparison

This commit is contained in:
Alex Zenla
2024-01-08 14:16:33 -08:00
parent f8938ac2c6
commit 8e2fc80ee0
3 changed files with 22 additions and 24 deletions

View File

@ -139,10 +139,7 @@ impl XsdSocket {
let error = CString::from_vec_with_nul(payload)?;
return Err(XsdBusError::new(error.to_str()?));
}
let response = XsdResponse {
header,
payload,
};
let response = XsdResponse { header, payload };
Ok(response)
}