Skip to content

Commit 4e867b4

Browse files
A6GibKmbilelmoussaoui
authored andcommitted
Run clippy --workspace --fix
1 parent 44acfa0 commit 4e867b4

5 files changed

Lines changed: 8 additions & 10 deletions

File tree

client/src/file/error.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,7 @@ impl std::fmt::Display for Error {
120120
broken_items,
121121
} => write!(
122122
f,
123-
"Keyring partially corrupted: {} valid items, {} broken items",
124-
valid_items, broken_items
123+
"Keyring partially corrupted: {valid_items} valid items, {broken_items} broken items",
125124
),
126125
Self::Crypto(e) => write!(f, "Failed to do a cryptography operation, {e}"),
127126
}

pam/src/socket.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ pub enum SocketError {
2020
impl std::fmt::Display for SocketError {
2121
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2222
match self {
23-
Self::Connect(e) => write!(f, "Failed to connect to daemon socket: {}", e),
24-
Self::Send(e) => write!(f, "Failed to send message: {}", e),
25-
Self::Serialize(e) => write!(f, "Failed to serialize message: {}", e),
23+
Self::Connect(e) => write!(f, "Failed to connect to daemon socket: {e}"),
24+
Self::Send(e) => write!(f, "Failed to send message: {e}"),
25+
Self::Serialize(e) => write!(f, "Failed to serialize message: {e}"),
2626
Self::Timeout => write!(f, "Operation timed out"),
2727
}
2828
}
@@ -98,7 +98,7 @@ async fn send_secret_to_daemon_async(
9898
) -> Result<(), SocketError> {
9999
let socket_path = std::env::var("OO7_PAM_SOCKET")
100100
.map(PathBuf::from)
101-
.unwrap_or_else(|_| PathBuf::from(format!("/run/user/{}/oo7-pam.sock", uid)));
101+
.unwrap_or_else(|_| PathBuf::from(format!("/run/user/{uid}/oo7-pam.sock")));
102102

103103
tracing::debug!("Connecting to daemon socket at: {}", socket_path.display());
104104

server/src/gnome/prompter.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ mod double_value_optional {
8080
// Try to downcast to check if it's double-wrapped
8181
let value_to_deserialize = match outer_value.downcast_ref::<Value>() {
8282
Ok(_) => outer_value.downcast::<Value>().map_err(|e| {
83-
serde::de::Error::custom(format!("Failed to unwrap double-wrapped Value: {}", e))
83+
serde::de::Error::custom(format!("Failed to unwrap double-wrapped Value: {e}"))
8484
})?,
8585
Err(_) => outer_value,
8686
};

server/src/pam_listener.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ impl PamListener {
5656
let uid = unsafe { libc::getuid() };
5757
let socket_path = std::env::var("OO7_PAM_SOCKET")
5858
.map(PathBuf::from)
59-
.unwrap_or_else(|_| PathBuf::from(format!("/run/user/{}/oo7-pam.sock", uid)));
59+
.unwrap_or_else(|_| PathBuf::from(format!("/run/user/{uid}/oo7-pam.sock")));
6060

6161
Self {
6262
socket_path,

server/src/service.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -896,8 +896,7 @@ impl Service {
896896
// Retrieve the pending collection metadata
897897
let Some((label, alias)) = self.pending_collection(prompt_path).await else {
898898
return Err(ServiceError::NoSuchObject(format!(
899-
"No pending collection for prompt `{}`",
900-
prompt_path
899+
"No pending collection for prompt `{prompt_path}`"
901900
)));
902901
};
903902

0 commit comments

Comments
 (0)