diff --git a/pbs-tools/src/format.rs b/pbs-tools/src/format.rs index a69f5a17..b7b3544d 100644 --- a/pbs-tools/src/format.rs +++ b/pbs-tools/src/format.rs @@ -16,7 +16,7 @@ pub fn render_backup_file_list(files: &[String]) -> String { files.sort(); - crate::str::join(&files, ' ') + files.join(" ") } pub fn render_epoch(value: &Value, _record: &Value) -> Result { diff --git a/pbs-tools/src/str.rs b/pbs-tools/src/str.rs index 387fe5fe..5bea2415 100644 --- a/pbs-tools/src/str.rs +++ b/pbs-tools/src/str.rs @@ -1,20 +1,5 @@ //! String related utilities. -use std::borrow::Borrow; - -pub fn join>(data: &[S], sep: char) -> String { - let mut list = String::new(); - - for item in data { - if !list.is_empty() { - list.push(sep); - } - list.push_str(item.borrow()); - } - - list -} - pub fn strip_ascii_whitespace(line: &[u8]) -> &[u8] { let line = match line.iter().position(|&b| !b.is_ascii_whitespace()) { Some(n) => &line[n..],