Skip to content

Commit

Permalink
char_len is more succinct than count_chars.
Browse files Browse the repository at this point in the history
  • Loading branch information
pnkfelix committed Aug 25, 2013
1 parent cc477df commit ca0e7b1
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/libextra/getopts.rs
Expand Up @@ -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
Expand Down Expand Up @@ -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(' ')
Expand Down

5 comments on commit ca0e7b1

@bors
Copy link
Contributor

@bors bors commented on ca0e7b1 Aug 25, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

saw approval from alexcrichton
at pnkfelix@ca0e7b1

@bors
Copy link
Contributor

@bors bors commented on ca0e7b1 Aug 25, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging pnkfelix/rust/fsk-issue5516-codepoint-fix = ca0e7b1 into auto

@bors
Copy link
Contributor

@bors bors commented on ca0e7b1 Aug 25, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pnkfelix/rust/fsk-issue5516-codepoint-fix = ca0e7b1 merged ok, testing candidate = 6a649e6

@bors
Copy link
Contributor

@bors bors commented on ca0e7b1 Aug 25, 2013

@bors
Copy link
Contributor

@bors bors commented on ca0e7b1 Aug 25, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fast-forwarding master to auto = 6a649e6

Please sign in to comment.