misc: tpm: streamline error Display::fmt()

The changes were mostly automatically applied using the Python
script mentioned in the first commit of this series.

Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de>
On-behalf-of: SAP philipp.schuster@sap.com
This commit is contained in:
Philipp Schuster
2025-05-21 12:31:40 +02:00
committed by Rob Bradford
parent 1ede418dcc
commit 3541cebbf1
3 changed files with 11 additions and 11 deletions
+3 -3
View File
@@ -13,11 +13,11 @@ use vmm_sys_util::sock_ctrl_msg::ScmSocket;
#[derive(Error, Debug)]
pub enum Error {
#[error("Cannot connect to tpm Socket: {0}")]
#[error("Cannot connect to tpm Socket")]
ConnectToSocket(#[source] anyhow::Error),
#[error("Failed to read from socket: {0}")]
#[error("Failed to read from socket")]
ReadFromSocket(#[source] anyhow::Error),
#[error("Failed to write to socket: {0}")]
#[error("Failed to write to socket")]
WriteToSocket(#[source] anyhow::Error),
}
type Result<T> = anyhow::Result<T, Error>;