From e060d83b8603d8f08e9eea068a30bed1349e5437 Mon Sep 17 00:00:00 2001 From: mulhern Date: Wed, 2 Oct 2024 17:02:23 -0400 Subject: [PATCH] Inline format string arguments Signed-off-by: mulhern --- src/engine/strat_engine/thinpool/thinpool.rs | 28 +++++++++----------- 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/src/engine/strat_engine/thinpool/thinpool.rs b/src/engine/strat_engine/thinpool/thinpool.rs index e11859c067..4b7fc487e1 100644 --- a/src/engine/strat_engine/thinpool/thinpool.rs +++ b/src/engine/strat_engine/thinpool/thinpool.rs @@ -474,8 +474,7 @@ impl ThinPool { let fs_uuid = *fs.uuid; if filesystem_metadata_map.insert(fs_uuid, fs).is_some() { return Err(StratisError::Msg(format!( - "Two filesystems with the same UUID, {:}, found in filesystem metadata", - fs_uuid + "Two filesystems with the same UUID, {fs_uuid}, found in filesystem metadata" ))); } } @@ -613,8 +612,8 @@ impl ThinPool { if let Err(e) = set_uuid(&fs.devnode(), merged.uuid) { error!( "Could not set the UUID of the XFS filesystem on th -e Stratis filesystem with UUID {} after revert, reason: {:?}", - merged.uuid, e +e Stratis filesystem with UUID {} after revert, reason: {e:?}", + merged.uuid ); }; fs.udev_fs_change(pool_name, merged.uuid, &merged.name); @@ -622,14 +621,14 @@ e Stratis filesystem with UUID {} after revert, reason: {:?}", let name = Name::new(merged.name.to_owned()); if let Err(e) = mdv.save_fs(&name, merged.uuid, &fs) { error!( - "Could not save MDV for fs with UUID {} and name {} belonging to pool with UUID {} after revert, reason: {:?}", - merged.uuid, merged.name, pool_uuid, e + "Could not save MDV for fs with UUID {} and name {} belonging to pool with UUID {pool_uuid} after revert, reason: {e:?}", + merged.uuid, merged.name, ); } if let Err(e) = mdv.rm_fs(snap.uuid) { error!( - "Could not remove old MDV for fs with UUID {} belonging to pool with UUID {} after revert, reason: {:?}", - snap.uuid, pool_uuid, e + "Could not remove old MDV for fs with UUID {} belonging to pool with UUID {pool_uuid} after revert, reason: {e:?}", + snap.uuid, ); }; assert!( @@ -642,8 +641,8 @@ e Stratis filesystem with UUID {} after revert, reason: {:?}", &format!("delete {:}", origin.thin_id), ) { warn!( - "Failed to delete space allocated for deleted origin filesystem with UUID {:} and thin id {:}: {:?} after revert", - origin.uuid, origin.thin_id, e + "Failed to delete space allocated for deleted origin filesystem with UUID {:} and thin id {:}: {e:?} after revert", + origin.uuid, origin.thin_id ); } for fs in filesystem_metadata_map.values_mut() { @@ -675,8 +674,7 @@ e Stratis filesystem with UUID {} after revert, reason: {:?}", } Err(err) => { warn!( - "Filesystem specified by metadata {:?} could not be setup, reason: {:?}", - fssave, err + "Filesystem specified by metadata {fssave:?} could not be setup, reason: {err:?}" ); } } @@ -1760,15 +1758,13 @@ e Stratis filesystem with UUID {} after revert, reason: {:?}", if let Some((n, u, _)) = others_scheduled.first() { return Err(StratisError::Msg(format!( - "Filesystem {:} with UUID {:} is already scheduled to be reverted into origin filesystem {:}, unwilling to schedule two revert operations on the same origin filesystem.", - n, u, origin, + "Filesystem {n} with UUID {u} is already scheduled to be reverted into origin filesystem {origin}, unwilling to schedule two revert operations on the same origin filesystem." ))); } if let Some((n, u, _)) = into_scheduled.first() { return Err(StratisError::Msg(format!( - "Filesystem {:} with UUID {:} is already scheduled to be reverted into this filesystem {:}. The ordering is ambiguous, unwilling to schedule a revert", - n, u, origin, + "Filesystem {n} with UUID {u} is already scheduled to be reverted into this filesystem {origin}. The ordering is ambiguous, unwilling to schedule a revert" ))); } }