From ca0e7b12aa3ec542a75769cc3453464813b20490 Mon Sep 17 00:00:00 2001 From: "Felix S. Klock II" Date: Sun, 25 Aug 2013 11:19:35 +0200 Subject: [PATCH] char_len is more succinct than count_chars. --- src/libextra/getopts.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/libextra/getopts.rs b/src/libextra/getopts.rs index 87aab3fbae2e1..a21d9dc605f40 100644 --- a/src/libextra/getopts.rs +++ b/src/libextra/getopts.rs @@ -501,7 +501,6 @@ pub enum FailType { pub mod groups { use getopts::{HasArg, Long, Maybe, Multi, No, Occur, Opt, Optional, Req}; use getopts::{Short, Yes}; - use std::str; /** one group of options, e.g., both -h and --help, along with * their shared description and properties @@ -692,7 +691,7 @@ pub mod groups { // FIXME: #5516 should be graphemes not codepoints // here we just need to indent the start of the description - let rowlen = str::count_chars(row, 0, row.len()); + let rowlen = row.char_len(); if rowlen < 24 { do (24 - rowlen).times { row.push_char(' ')