Remove two useless comparisons
according to the updated type_limits lint.
This commit is contained in:
parent
0e8e0b2ede
commit
169a57ee8d
@ -268,7 +268,7 @@ impl<'a, 'b> Context<'a, 'b> {
|
||||
fn verify_arg_type(&mut self, arg: Position, ty: ArgumentType) {
|
||||
match arg {
|
||||
Exact(arg) => {
|
||||
if arg < 0 || self.args.len() <= arg {
|
||||
if self.args.len() <= arg {
|
||||
let msg = format!("invalid reference to argument `{}` (there \
|
||||
are {} arguments)", arg, self.args.len());
|
||||
self.ecx.span_err(self.fmtsp, msg);
|
||||
|
@ -220,9 +220,7 @@ pub fn parse(file: &mut io::Reader,
|
||||
if bools_bytes != 0 {
|
||||
for i in range(0, bools_bytes) {
|
||||
let b = try!(file.read_byte());
|
||||
if b < 0 {
|
||||
return Err("error: expected more bools but hit EOF".to_owned());
|
||||
} else if b == 1 {
|
||||
if b == 1 {
|
||||
bools_map.insert(bnames[i as uint].to_owned(), true);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user