diff options
| author | Tim Chevalier <chevalier@alum.wellesley.edu> | 2012-09-18 22:35:42 -0700 |
|---|---|---|
| committer | Tim Chevalier <chevalier@alum.wellesley.edu> | 2012-10-12 20:43:37 -0700 |
| commit | 90d06b80fdc7f07c5589ecd702da17998d0ef7ca (patch) | |
| tree | 74892761df632abb29a469b6192d541b7ac13e37 /src/libstd/net_ip.rs | |
| parent | 30a62793fa54a413a265591879c9775b798d762c (diff) | |
| download | rust-90d06b80fdc7f07c5589ecd702da17998d0ef7ca.tar.gz rust-90d06b80fdc7f07c5589ecd702da17998d0ef7ca.zip | |
Make moves explicit in std tests
Diffstat (limited to 'src/libstd/net_ip.rs')
| -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 2d9dd5bdf4e..cf5323c498b 100644 --- a/src/libstd/net_ip.rs +++ b/src/libstd/net_ip.rs @@ -128,7 +128,7 @@ pub mod v4 { */ pub fn parse_addr(ip: &str) -> IpAddr { match try_parse_addr(ip) { - result::Ok(copy addr) => addr, + result::Ok(move addr) => move addr, result::Err(ref err_data) => fail err_data.err_msg } } @@ -214,7 +214,7 @@ pub mod v6 { */ pub fn parse_addr(ip: &str) -> IpAddr { match try_parse_addr(ip) { - result::Ok(copy addr) => addr, + result::Ok(move addr) => move addr, result::Err(copy err_data) => fail err_data.err_msg } } @@ -353,7 +353,7 @@ mod test { } // note really sure how to realiably test/assert // this.. mostly just wanting to see it work, atm. - let results = result::unwrap(ga_result); + let results = result::unwrap(move ga_result); log(debug, fmt!("test_get_addr: Number of results for %s: %?", localhost_name, vec::len(results))); for vec::each(results) |r| { @@ -366,7 +366,7 @@ mod test { } // at least one result.. this is going to vary from system // to system, based on stuff like the contents of /etc/hosts - assert vec::len(results) > 0; + assert !results.is_empty(); } #[test] #[ignore(reason = "valgrind says it's leaky")] |
