summaryrefslogtreecommitdiff
path: root/src/diag.rs
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2023-03-11 11:46:12 +0100
committerLaurenz <laurmaedje@gmail.com>2023-03-11 11:46:12 +0100
commit8e5f446544fd147277ed2e4208c7ea793cc846a7 (patch)
treef8b0143fb3845da6673ca1312f03ab53f0f28a50 /src/diag.rs
parenta9fdff244aef859449a76e5f762ee7c343a8ddcc (diff)
Autocompletion for raw language tags
Diffstat (limited to 'src/diag.rs')
-rw-r--r--src/diag.rs24
1 files changed, 0 insertions, 24 deletions
diff --git a/src/diag.rs b/src/diag.rs
index eca6827c..b12df209 100644
--- a/src/diag.rs
+++ b/src/diag.rs
@@ -177,30 +177,6 @@ where
}
}
-/// Format the parts separated with commas and a final "and" or "or".
-pub(crate) fn comma_list<S>(buf: &mut String, parts: &[S], last: &str)
-where
- S: AsRef<str>,
-{
- for (i, part) in parts.iter().enumerate() {
- match i {
- 0 => {}
- 1 if parts.len() == 2 => {
- buf.push(' ');
- buf.push_str(last);
- buf.push(' ');
- }
- i if i + 1 == parts.len() => {
- buf.push_str(", ");
- buf.push_str(last);
- buf.push(' ');
- }
- _ => buf.push_str(", "),
- }
- buf.push_str(part.as_ref());
- }
-}
-
/// A result type with a file-related error.
pub type FileResult<T> = Result<T, FileError>;