From b099760269ecf7920eed99919ff6bdbd341ecf95 Mon Sep 17 00:00:00 2001 From: Tim Chevalier Date: Thu, 25 Aug 2011 22:26:45 -0700 Subject: Remove remaining use of 'pred' and make 'pred' a non-reserved word. Huzzah\! --- src/lib/str.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/lib') diff --git a/src/lib/str.rs b/src/lib/str.rs index 98e59f70b4f..eff9e9bfd28 100644 --- a/src/lib/str.rs +++ b/src/lib/str.rs @@ -156,10 +156,10 @@ fn is_ascii(s: str) -> bool { fn alloc(n_bytes: uint) -> str { ret rustrt::str_alloc(n_bytes); } /// Returns true if the string has length 0 -pred is_empty(s: str) -> bool { for c: u8 in s { ret false; } ret true; } +pure fn is_empty(s: str) -> bool { for c: u8 in s { ret false; } ret true; } /// Returns true if the string has length greater than 0 -pred is_not_empty(s: str) -> bool { !is_empty(s) } +pure fn is_not_empty(s: str) -> bool { !is_empty(s) } fn is_whitespace(s: str) -> bool { let i = 0u; -- cgit 1.4.1-3-g733a5