about summary refs log tree commit diff
path: root/src/libextra
diff options
context:
space:
mode:
authorHuon Wilson <dbau.pp+github@gmail.com>2013-06-11 12:05:42 +1000
committerHuon Wilson <dbau.pp+github@gmail.com>2013-06-12 12:21:03 +1000
commit8786bca7e2978e6c1d6eed7e61680b0f25db1f18 (patch)
tree275bea77da23c3e7a6872a5786f619d00370397e /src/libextra
parent3c23a0a836164ed3ac1b94b526ff8f4e71571e8e (diff)
downloadrust-8786bca7e2978e6c1d6eed7e61680b0f25db1f18.tar.gz
rust-8786bca7e2978e6c1d6eed7e61680b0f25db1f18.zip
std: convert str::repeat to a method.
Diffstat (limited to 'src/libextra')
-rw-r--r--src/libextra/getopts.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libextra/getopts.rs b/src/libextra/getopts.rs
index 9fe9ad64010..9fe81804bd2 100644
--- a/src/libextra/getopts.rs
+++ b/src/libextra/getopts.rs
@@ -593,7 +593,7 @@ pub mod groups {
      */
     pub fn usage(brief: &str, opts: &[OptGroup]) -> ~str {
 
-        let desc_sep = ~"\n" + str::repeat(" ", 24);
+        let desc_sep = ~"\n" + " ".repeat(24);
 
         let rows = vec::map(opts, |optref| {
             let OptGroup{short_name: short_name,
@@ -603,7 +603,7 @@ pub mod groups {
                          hasarg: hasarg,
                          _} = copy *optref;
 
-            let mut row = str::repeat(" ", 4);
+            let mut row = " ".repeat(4);
 
             // short option
             row += match short_name.len() {
@@ -629,7 +629,7 @@ pub mod groups {
             // here we just need to indent the start of the description
             let rowlen = row.len();
             row += if rowlen < 24 {
-                str::repeat(" ", 24 - rowlen)
+                " ".repeat(24 - rowlen)
             } else {
                 copy desc_sep
             };