Skip to content

Commit d244684

Browse files
committed
Fix clippy issues on 1.90.0
1 parent 20b4d2b commit d244684

28 files changed

+46
-58
lines changed

asyncgit/src/asyncjob/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ impl<J: 'static + AsyncJob> AsyncSingleJob<J> {
130130
let self_clone = (*self).clone();
131131
rayon_core::spawn(move || {
132132
if let Err(e) = self_clone.run_job(task) {
133-
log::error!("async job error: {}", e);
133+
log::error!("async job error: {e}");
134134
}
135135
});
136136

asyncgit/src/blame.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ impl AsyncBlame {
116116

117117
let notify = match notify {
118118
Err(err) => {
119-
log::error!("get_blame_helper error: {}", err);
119+
log::error!("get_blame_helper error: {err}");
120120
true
121121
}
122122
Ok(notify) => notify,

asyncgit/src/commit_files.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ impl AsyncCommitFiles {
8989
return Ok(());
9090
}
9191

92-
log::trace!("request: {:?}", params);
92+
log::trace!("request: {params:?}");
9393

9494
{
9595
let current = self.current.lock()?;

asyncgit/src/diff.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ impl AsyncDiff {
9898
&self,
9999
params: DiffParams,
100100
) -> Result<Option<FileDiff>> {
101-
log::trace!("request {:?}", params);
101+
log::trace!("request {params:?}");
102102

103103
let hash = hash(&params);
104104

@@ -132,7 +132,7 @@ impl AsyncDiff {
132132

133133
let notify = match notify {
134134
Err(err) => {
135-
log::error!("get_diff_helper error: {}", err);
135+
log::error!("get_diff_helper error: {err}");
136136
true
137137
}
138138
Ok(notify) => notify,

asyncgit/src/pull.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ impl AsyncPull {
153153
*last_res = match res {
154154
Ok(bytes) => Some((bytes, String::new())),
155155
Err(e) => {
156-
log::error!("fetch error: {}", e);
156+
log::error!("fetch error: {e}");
157157
Some((0, e.to_string()))
158158
}
159159
};

asyncgit/src/push.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ impl AsyncPush {
164164
*last_res = match res {
165165
Ok(()) => None,
166166
Err(e) => {
167-
log::error!("push error: {}", e);
167+
log::error!("push error: {e}");
168168
Some(e.to_string())
169169
}
170170
};

asyncgit/src/push_tags.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ impl AsyncPushTags {
147147
*last_res = match res {
148148
Ok(()) => None,
149149
Err(e) => {
150-
log::error!("push error: {}", e);
150+
log::error!("push error: {e}");
151151
Some(e.to_string())
152152
}
153153
};

asyncgit/src/remote_progress.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,7 @@ impl RemoteProgress {
9696
}
9797
Err(e) => {
9898
log::error!(
99-
"remote progress receiver error: {}",
100-
e
99+
"remote progress receiver error: {e}"
101100
);
102101
break;
103102
}

asyncgit/src/status.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ impl AsyncStatus {
135135
&arc_current,
136136
&arc_last,
137137
) {
138-
log::error!("fetch_helper: {}", e);
138+
log::error!("fetch_helper: {e}");
139139
}
140140

141141
arc_pending.fetch_sub(1, Ordering::Relaxed);
@@ -158,9 +158,7 @@ impl AsyncStatus {
158158
) -> Result<()> {
159159
let res = Self::get_status(repo, status_type, config)?;
160160
log::trace!(
161-
"status fetched: {} (type: {:?})",
162-
hash_request,
163-
status_type,
161+
"status fetched: {hash_request} (type: {status_type:?})",
164162
);
165163

166164
{

asyncgit/src/sync/remotes/callbacks.rs

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -107,11 +107,7 @@ impl Callbacks {
107107
reference: &str,
108108
msg: Option<&str>,
109109
) {
110-
log::debug!(
111-
"push_update_reference: '{}' {:?}",
112-
reference,
113-
msg
114-
);
110+
log::debug!("push_update_reference: '{reference}' {msg:?}");
115111

116112
if let Ok(mut stats) = self.stats.lock() {
117113
stats.push_rejected_msg = msg
@@ -125,7 +121,7 @@ impl Callbacks {
125121
total: usize,
126122
current: usize,
127123
) {
128-
log::debug!("packing: {:?} - {}/{}", stage, current, total);
124+
log::debug!("packing: {stage:?} - {current}/{total}");
129125
self.sender.clone().map(|sender| {
130126
sender.send(ProgressNotification::Packing {
131127
stage,
@@ -150,7 +146,7 @@ impl Callbacks {
150146
}
151147

152148
fn update_tips(&self, name: &str, a: git2::Oid, b: git2::Oid) {
153-
log::debug!("update tips: '{}' [{}] [{}]", name, a, b);
149+
log::debug!("update tips: '{name}' [{a}] [{b}]");
154150
self.sender.clone().map(|sender| {
155151
sender.send(ProgressNotification::UpdateTips {
156152
name: name.to_string(),
@@ -166,7 +162,7 @@ impl Callbacks {
166162
total: usize,
167163
bytes: usize,
168164
) {
169-
log::debug!("progress: {}/{} ({} B)", current, total, bytes,);
165+
log::debug!("progress: {current}/{total} ({bytes} B)",);
170166
self.sender.clone().map(|sender| {
171167
sender.send(ProgressNotification::PushTransfer {
172168
current,
@@ -187,10 +183,7 @@ impl Callbacks {
187183
allowed_types: git2::CredentialType,
188184
) -> std::result::Result<Cred, GitError> {
189185
log::debug!(
190-
"creds: '{}' {:?} ({:?})",
191-
url,
192-
username_from_url,
193-
allowed_types
186+
"creds: '{url}' {username_from_url:?} ({allowed_types:?})"
194187
);
195188

196189
// This boolean is used to avoid multiple calls to credentials callback.

0 commit comments

Comments
 (0)