From e4337a9defcad3f2a65da285ab78f8ede554f379 Mon Sep 17 00:00:00 2001 From: Daniel Micay Date: Thu, 24 Jan 2013 23:24:57 -0500 Subject: remove remaining is_not_empty functions/methods --- src/libsyntax/attr.rs | 2 +- src/libsyntax/diagnostic.rs | 2 +- src/libsyntax/parse/parser.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/libsyntax') 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"); } } -- cgit 1.4.1-3-g733a5