]> git.lizzy.rs Git - rust.git/blobdiff - src/libgetopts/lib.rs
Auto merge of #26957 - wesleywiser:rename_connect_to_join, r=alexcrichton
[rust.git] / src / libgetopts / lib.rs
index 8ee0b10e1748ecad03286d3498e7a015b897a113..8953375297db26e5309886d49e9b912a6f2fb9de 100644 (file)
@@ -784,13 +784,13 @@ pub fn usage(brief: &str, opts: &[OptGroup]) -> String {
 
         // FIXME: #5516 should be graphemes not codepoints
         // wrapped description
-        row.push_str(&desc_rows.connect(&desc_sep[..]));
+        row.push_str(&desc_rows.join(&desc_sep[..]));
 
         row
     });
 
     format!("{}\n\nOptions:\n{}\n", brief,
-            rows.collect::<Vec<String>>().connect("\n"))
+            rows.collect::<Vec<String>>().join("\n"))
 }
 
 fn format_option(opt: &OptGroup) -> String {
@@ -836,7 +836,7 @@ pub fn short_usage(program_name: &str, opts: &[OptGroup]) -> String {
     line.push_str(&opts.iter()
                        .map(format_option)
                        .collect::<Vec<String>>()
-                       .connect(" ")[..]);
+                       .join(" ")[..]);
     line
 }