提交 ca0e7b12 编写于 作者: F Felix S. Klock II

char_len is more succinct than count_chars.

上级 cc477dfa
......@@ -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 fn usage(brief: &str, opts: &[OptGroup]) -> ~str {
// 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(' ')
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册