diff options
author | Marcin Puc | 2022-03-30 00:08:30 +0000 |
---|---|---|
committer | GitHub | 2022-03-30 00:08:30 +0000 |
commit | f2dd3d446914ec0953cd7e056d430fc3b959e75d (patch) | |
tree | 4fb839ec2a389bbdca4e64931de8516db010c6a4 /helix-term/src/health.rs | |
parent | c8082a113321455cd1025a115e8da72eca37e320 (diff) |
Avoid using the format ident Rust feature (#1881)
Diffstat (limited to 'helix-term/src/health.rs')
-rw-r--r-- | helix-term/src/health.rs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/helix-term/src/health.rs b/helix-term/src/health.rs index f13d35f0..2a02e118 100644 --- a/helix-term/src/health.rs +++ b/helix-term/src/health.rs @@ -89,10 +89,11 @@ pub fn languages_all() { let column = |item: &str, color: Color| { let data = format!( - "{:column_width$}", + "{:width$}", item.get(..column_width - 2) - .map(|s| format!("{s}…")) - .unwrap_or_else(|| item.to_string()) + .map(|s| format!("{}…", s)) + .unwrap_or_else(|| item.to_string()), + width = column_width, ) .stylize() .with(color); @@ -158,7 +159,7 @@ pub fn language(lang_str: String) { { Some(l) => l, None => { - let msg = format!("Language '{lang_str}' not found"); + let msg = format!("Language '{}' not found", lang_str); println!("{}", msg.red()); let suggestions: Vec<&str> = syn_loader_conf .language |