Merge pull request #709 from jbcrail/rm-parentheses

Remove unnecessary parentheses.
This commit is contained in:
Heather 2015-10-31 11:38:42 +04:00
commit a102d63be5
3 changed files with 7 additions and 7 deletions

View file

@ -59,7 +59,7 @@ fn convert_str(string: &[u8], index: usize, base: u32) -> (char, usize) {
};
let mut bytes = vec!();
for offset in (0usize .. max_digits) {
for offset in 0usize .. max_digits {
if string.len() <= index + offset as usize {
break;
}
@ -206,7 +206,7 @@ pub fn uumain(args: Vec<String>) -> i32 {
print!("\\x");
} else {
print!("{}", c);
for _ in (0 .. num_char_used) {
for _ in 0 .. num_char_used {
iter.next(); // consume used characters
}
}
@ -217,7 +217,7 @@ pub fn uumain(args: Vec<String>) -> i32 {
print!("\0");
} else {
print!("{}", c);
for _ in (0 .. num_char_used) {
for _ in 0 .. num_char_used {
iter.next(); // consume used characters
}
}
@ -228,7 +228,7 @@ pub fn uumain(args: Vec<String>) -> i32 {
print!("\\{}", c);
} else {
print!("{}", esc_c);
for _ in (1 .. num_char_used) {
for _ in 1 .. num_char_used {
iter.next(); // consume used characters
}
}

View file

@ -165,7 +165,7 @@ fn obsolete(options: &[String]) -> (Vec<String>, Option<usize>) {
if current.len() > 1 && current[0] == '-' as u8 {
let len = current.len();
for pos in (1 .. len) {
for pos in 1 .. len {
// Ensure that the argument is only made out of digits
if !(current[pos] as char).is_numeric() { break; }

View file

@ -182,7 +182,7 @@ fn parse_size(mut size_slice: &str) -> Option<usize> {
};
let mut multiplier = 1usize;
for _ in (0usize .. exponent) {
for _ in 0usize .. exponent {
multiplier *= base;
}
if base == 1000usize && exponent == 0usize {
@ -212,7 +212,7 @@ fn obsolete(options: &[String]) -> (Vec<String>, Option<usize>) {
if current.len() > 1 && current[0] == '-' as u8 {
let len = current.len();
for pos in (1 .. len) {
for pos in 1 .. len {
// Ensure that the argument is only made out of digits
if !(current[pos] as char).is_numeric() { break; }