diff options
| author | Patrick Walton <pcwalton@mimiga.net> | 2012-09-05 20:55:28 -0700 |
|---|---|---|
| committer | Patrick Walton <pcwalton@mimiga.net> | 2012-09-05 20:55:28 -0700 |
| commit | f6d50d866a5f067d292875193ae5f30a756e6ad3 (patch) | |
| tree | 98c91e434882082826d2514db549e749b741fd9c /src/libcore | |
| parent | d1554106742fa8c0a99cac1adc5f65aa0ce0ac62 (diff) | |
libcore: Make to_upper() and to_lower() pure
Diffstat (limited to 'src/libcore')
| -rw-r--r-- | src/libcore/str.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libcore/str.rs b/src/libcore/str.rs index fe4d1cba407..bc669870c49 100644 --- a/src/libcore/str.rs +++ b/src/libcore/str.rs @@ -2160,8 +2160,8 @@ trait StrSlice { fn split_str(sep: &a/str) -> ~[~str]; fn starts_with(needle: &a/str) -> bool; fn substr(begin: uint, n: uint) -> ~str; - fn to_lower() -> ~str; - fn to_upper() -> ~str; + pure fn to_lower() -> ~str; + pure fn to_upper() -> ~str; fn escape_default() -> ~str; fn escape_unicode() -> ~str; pure fn to_unique() -> ~str; @@ -2262,10 +2262,10 @@ impl &str: StrSlice { fn substr(begin: uint, n: uint) -> ~str { substr(self, begin, n) } /// Convert a string to lowercase #[inline] - fn to_lower() -> ~str { to_lower(self) } + pure fn to_lower() -> ~str { to_lower(self) } /// Convert a string to uppercase #[inline] - fn to_upper() -> ~str { to_upper(self) } + pure fn to_upper() -> ~str { to_upper(self) } /// Escape each char in `s` with char::escape_default. #[inline] fn escape_default() -> ~str { escape_default(self) } |
