diff options
| author | Tim Chevalier <chevalier@alum.wellesley.edu> | 2012-09-28 12:22:33 -0700 |
|---|---|---|
| committer | Tim Chevalier <chevalier@alum.wellesley.edu> | 2012-09-28 13:47:45 -0700 |
| commit | 2f4ee891199d3dffd8382742f576c3e78081634e (patch) | |
| tree | d23a11352a1adf5eb20741111eb6a3ca22a01510 /src/libstd | |
| parent | 21519bc7e0a32e388e8b12be5d36d4440129f417 (diff) | |
| download | rust-2f4ee891199d3dffd8382742f576c3e78081634e.tar.gz rust-2f4ee891199d3dffd8382742f576c3e78081634e.zip | |
Demode extfmt
Needs a snapshot before this can be completed, because I changed the mode for conv_poly.
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/net_ip.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libstd/net_ip.rs b/src/libstd/net_ip.rs index 5b2ea0a84a6..321eb3158a9 100644 --- a/src/libstd/net_ip.rs +++ b/src/libstd/net_ip.rs @@ -156,14 +156,14 @@ mod v4 { fn parse_to_ipv4_rep(ip: &str) -> result::Result<Ipv4Rep, ~str> { let parts = vec::map(str::split_char(ip, '.'), |s| { match uint::from_str(*s) { - Some(n) if n <= 255u => n, - _ => 256u + Some(n) if n <= 255 => n, + _ => 256 } }); - if vec::len(parts) != 4u { + if parts.len() != 4 { result::Err(fmt!("'%s' doesn't have 4 parts", ip)) } - else if vec::contains(parts, &256u) { + else if parts.contains(&256) { result::Err(fmt!("invalid octal in addr '%s'", ip)) } else { |
