Skip to content

Commit 55d4f35

Browse files
committed
Use simpler form for string concatenation
1 parent 6993765 commit 55d4f35

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

src/cli/self_update.rs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ impl FromStr for SelfUpdateMode {
270270
_ => Err(anyhow!(format!(
271271
"unknown self update mode: '{}'; valid modes are {}",
272272
mode,
273-
valid_self_update_modes(),
273+
Self::modes().join(", "),
274274
))),
275275
}
276276
}
@@ -1303,14 +1303,6 @@ pub(crate) fn cleanup_self_updater() -> Result<()> {
13031303
Ok(())
13041304
}
13051305

1306-
pub(crate) fn valid_self_update_modes() -> String {
1307-
SelfUpdateMode::modes()
1308-
.iter()
1309-
.map(|s| format!("'{s}'"))
1310-
.collect::<Vec<_>>()
1311-
.join(", ")
1312-
}
1313-
13141306
#[cfg(test)]
13151307
mod tests {
13161308
use std::collections::HashMap;

0 commit comments

Comments
 (0)