diff options
| author | Daniel Micay <danielmicay@gmail.com> | 2013-01-24 22:19:44 -0500 |
|---|---|---|
| committer | Daniel Micay <danielmicay@gmail.com> | 2013-01-24 23:02:44 -0500 |
| commit | d95c9cbe3891837b7e608473876fcd97dc35a6c9 (patch) | |
| tree | f7085140401223b8e2714d91784aa7db6cb9e86d /src/libstd | |
| parent | c3f4f654eb35b21df4f1f893721b89d0897dbe93 (diff) | |
replace ConstVector trait with the Container trait
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/bigint.rs | 2 | ||||
| -rw-r--r-- | src/libstd/flatpipes.rs | 4 | ||||
| -rw-r--r-- | src/libstd/getopts.rs | 6 |
3 files changed, 6 insertions, 6 deletions
diff --git a/src/libstd/bigint.rs b/src/libstd/bigint.rs index 678565ee325..fc783429126 100644 --- a/src/libstd/bigint.rs +++ b/src/libstd/bigint.rs @@ -402,7 +402,7 @@ pub impl BigUint { } pure fn is_zero(&self) -> bool { self.data.is_empty() } - pure fn is_not_zero(&self) -> bool { self.data.is_not_empty() } + pure fn is_not_zero(&self) -> bool { !self.data.is_empty() } pure fn is_positive(&self) -> bool { self.is_not_zero() } pure fn is_negative(&self) -> bool { false } pure fn is_nonpositive(&self) -> bool { self.is_zero() } diff --git a/src/libstd/flatpipes.rs b/src/libstd/flatpipes.rs index 534f1b7d479..ea7b2442bb9 100644 --- a/src/libstd/flatpipes.rs +++ b/src/libstd/flatpipes.rs @@ -599,7 +599,7 @@ pub mod bytepipes { } else if self.buf.is_empty() { match self.port.try_recv() { Some(move buf) => { - assert buf.is_not_empty(); + assert !buf.is_empty(); self.buf = move buf; return self.try_recv(count); } @@ -904,7 +904,7 @@ mod test { fn pipe_port_loader(bytes: ~[u8] ) -> pod::PipePort<int> { let (port, chan) = pipes::stream(); - if bytes.is_not_empty() { + if !bytes.is_empty() { chan.send(move bytes); } pod::pipe_port(move port) diff --git a/src/libstd/getopts.rs b/src/libstd/getopts.rs index e3cc6797abf..b3e5854bf45 100644 --- a/src/libstd/getopts.rs +++ b/src/libstd/getopts.rs @@ -45,7 +45,7 @@ * } * * fn main(args: ~[str]) { - * check vec::is_not_empty(args); + * check !args.is_empty() * * let program : str = vec::head(args); * @@ -63,7 +63,7 @@ * return; * } * let output = opt_maybe_str(matches, "o"); - * let input = if vec::is_not_empty(matches.free) { + * let input = if !matches.free.is_empty() { * matches.free[0] * } else { * print_usage(program); @@ -357,7 +357,7 @@ fn opt_val(mm: &Matches, nm: &str) -> Optval { return opt_vals(mm, nm)[0]; } /// Returns true if an option was matched pub fn opt_present(mm: &Matches, nm: &str) -> bool { - opt_vals(mm, nm).is_not_empty() + !opt_vals(mm, nm).is_empty() } /// Returns the number of times an option was matched |
