Skip to content

Commit dac9f14

Browse files
committed
chore: Update to Rust 1.88
Clean up new clippy complaints
1 parent 835d0ca commit dac9f14

File tree

9 files changed

+15
-18
lines changed

9 files changed

+15
-18
lines changed

mgmtd/src/bee_msg.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ pub async fn notify_nodes<M: Msg + Serializable>(
194194
node_types: &'static [NodeType],
195195
msg: &M,
196196
) {
197-
log::trace!("NOTIFICATION to {:?}: {:?}", node_types, msg);
197+
log::trace!("NOTIFICATION to {node_types:?}: {msg:?}");
198198

199199
if let Err(err) = async {
200200
for t in node_types {

mgmtd/src/bee_msg/target.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ impl HandleWithResponse for SetStorageTargetInfo {
262262
})
263263
.await?;
264264

265-
log::debug!("Updated {:?} target info", node_type,);
265+
log::debug!("Updated {node_type:?} target info");
266266

267267
// in the old mgmtd, a notice to refresh cap pools is sent out here if a cap pool
268268
// changed I consider this being to expensive to check here and just don't

mgmtd/src/config.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -482,13 +482,13 @@ pub fn load_and_parse() -> Result<(Config, Vec<String>)> {
482482
let file_config: OptionalConfig =
483483
toml::from_str(toml_config).with_context(|| "Could not parse config file")?;
484484

485-
info_log.push(format!("Loaded config file from {:?}", config_file));
485+
info_log.push(format!("Loaded config file from {config_file:?}"));
486486
config.update_from_optional(file_config);
487487
}
488488
Err(err) => {
489489
if config_file != &config.config_file {
490490
return Err(err)
491-
.with_context(|| format!("Could not open config file at {:?}", config_file));
491+
.with_context(|| format!("Could not open config file at {config_file:?}"));
492492
}
493493

494494
info_log.push("No config file found at default location, ignoring".to_string());

mgmtd/src/db/import_v7.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -374,10 +374,7 @@ fn quota(tx: &Transaction, quota_path: &Path) -> Result<()> {
374374

375375
quota_default_limits(tx, &e.path().join("quotaDefaultLimits.store"), pool_id)
376376
.with_context(|| {
377-
format!(
378-
"quota default limits ({}/quotaDefaultLimits.store)",
379-
pool_id
380-
)
377+
format!("quota default limits ({pool_id}/quotaDefaultLimits.store)")
381378
})?;
382379

383380
quota_limits(
@@ -386,15 +383,15 @@ fn quota(tx: &Transaction, quota_path: &Path) -> Result<()> {
386383
pool_id,
387384
QuotaIdType::User,
388385
)
389-
.with_context(|| format!("quota user limits ({}/quotaUserLimits.store)", pool_id))?;
386+
.with_context(|| format!("quota user limits ({pool_id}/quotaUserLimits.store)"))?;
390387

391388
quota_limits(
392389
tx,
393390
&e.path().join("quotaGroupLimits.store"),
394391
pool_id,
395392
QuotaIdType::Group,
396393
)
397-
.with_context(|| format!("quota group limits ({}/quotaGroupLimits.store)", pool_id))?;
394+
.with_context(|| format!("quota group limits ({pool_id}/quotaGroupLimits.store)"))?;
398395

399396
// We intentionally ignore the quota usage data - it is fetched and updated from the
400397
// nodes on a regular basis anyway.

mgmtd/src/db/target.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -331,8 +331,8 @@ mod test {
331331

332332
assert_eq!(19, targets.len());
333333

334-
assert!(targets.iter().any(|e| *e == new_target_id));
335-
assert!(targets.iter().any(|e| *e == 1000));
334+
assert!(targets.contains(&new_target_id));
335+
assert!(targets.contains(&1000));
336336
})
337337
}
338338
}

mgmtd/src/grpc/buddy_group.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ Primary result: {:?}, Secondary result: {:?}",
219219
.await?;
220220

221221
if execute {
222-
log::info!("Buddy group deleted: {}", group);
222+
log::info!("Buddy group deleted: {group}");
223223
}
224224

225225
Ok(pm::DeleteBuddyGroupResponse {

mgmtd/src/timer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ async fn delete_stale_clients(ctx: Context, mut run_state: RunStateHandle) {
4747
{
4848
Ok(affected) => {
4949
if affected > 0 {
50-
log::info!("Deleted {} stale clients", affected);
50+
log::info!("Deleted {affected} stale clients");
5151
}
5252
}
5353
Err(err) => log::error!("Deleting stale clients failed: {err:#}"),

rust-toolchain.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[toolchain]
2-
channel = "1.85"
2+
channel = "1.88"
33
profile = "default"

shared/src/conn/outgoing.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ impl Pool {
4848
node_uid: Uid,
4949
msg: &M,
5050
) -> Result<R> {
51-
log::trace!("REQUEST to {:?}: {:?}", node_uid, msg);
51+
log::trace!("REQUEST to {node_uid:?}: {msg:?}");
5252

5353
let mut buf = self.store.pop_buf().unwrap_or_default();
5454

@@ -58,14 +58,14 @@ impl Pool {
5858

5959
self.store.push_buf(buf);
6060

61-
log::trace!("RESPONSE RECEIVED from {:?}: {:?}", node_uid, resp);
61+
log::trace!("RESPONSE RECEIVED from {node_uid:?}: {resp:?}");
6262

6363
Ok(resp)
6464
}
6565

6666
/// Sends a [Msg] to a node and does **not** receive a response.
6767
pub async fn send<M: Msg + Serializable>(&self, node_uid: Uid, msg: &M) -> Result<()> {
68-
log::trace!("SEND to {:?}: {:?}", node_uid, msg);
68+
log::trace!("SEND to {node_uid:?}: {msg:?}");
6969

7070
let mut buf = self.store.pop_buf().unwrap_or_default();
7171

0 commit comments

Comments
 (0)