pub trait JoinStrsExt: Sized { /// Join an iterator of `str` with a seperator fn join(self, with: &str) -> String; } impl JoinStrsExt for I where I: Iterator, T: AsRef { fn join(self, with: &str) -> String { let mut output = String::new(); let mut first=true; for string in self { if !first { output.push_str(with); } let string = string.as_ref(); output.push_str(string); first=false; } output } }