diff options
| author | Daniel Micay <danielmicay@gmail.com> | 2013-01-24 23:24:57 -0500 |
|---|---|---|
| committer | Daniel Micay <danielmicay@gmail.com> | 2013-01-24 23:24:57 -0500 |
| commit | e4337a9defcad3f2a65da285ab78f8ede554f379 (patch) | |
| tree | 21d2bff727548efa00e3cf7225ab9e43a9d5a2c7 /src/libsyntax | |
| parent | ec3f6e1932db297d2a575e591d4c508d785a0a52 (diff) | |
| download | rust-e4337a9defcad3f2a65da285ab78f8ede554f379.tar.gz rust-e4337a9defcad3f2a65da285ab78f8ede554f379.zip | |
remove remaining is_not_empty functions/methods
Diffstat (limited to 'src/libsyntax')
| -rw-r--r-- | src/libsyntax/attr.rs | 2 | ||||
| -rw-r--r-- | src/libsyntax/diagnostic.rs | 2 | ||||
| -rw-r--r-- | src/libsyntax/parse/parser.rs | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/src/libsyntax/attr.rs b/src/libsyntax/attr.rs index 56fe46251e9..ed52fbd0f5a 100644 --- a/src/libsyntax/attr.rs +++ b/src/libsyntax/attr.rs @@ -245,7 +245,7 @@ fn contains_name(metas: &[@ast::meta_item], name: &str) -> bool { } fn attrs_contains_name(attrs: &[ast::attribute], name: &str) -> bool { - vec::is_not_empty(find_attrs_by_name(attrs, name)) + !find_attrs_by_name(attrs, name).is_empty() } fn first_attr_value_str_by_name(attrs: ~[ast::attribute], name: ~str) diff --git a/src/libsyntax/diagnostic.rs b/src/libsyntax/diagnostic.rs index c00b956f553..6112313cf48 100644 --- a/src/libsyntax/diagnostic.rs +++ b/src/libsyntax/diagnostic.rs @@ -192,7 +192,7 @@ fn diagnosticcolor(lvl: level) -> u8 { fn print_diagnostic(topic: ~str, lvl: level, msg: &str) { let use_color = term::color_supported() && io::stderr().get_type() == io::Screen; - if str::is_not_empty(topic) { + if !topic.is_empty() { io::stderr().write_str(fmt!("%s ", topic)); } if use_color { diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index 7183b623ef4..0bd08250617 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -2237,7 +2237,7 @@ impl Parser { fn check_expected_item(p: Parser, current_attrs: ~[attribute]) { // If we have attributes then we should have an item - if vec::is_not_empty(current_attrs) { + if !current_attrs.is_empty() { p.fatal(~"expected item after attrs"); } } |
