diff options
| author | Stefan Plantikow <stefan.plantikow@googlemail.com> | 2011-12-16 18:18:34 +0100 |
|---|---|---|
| committer | Stefan Plantikow <stefan.plantikow@googlemail.com> | 2011-12-16 18:18:34 +0100 |
| commit | 7d786318a1b0f9315164716b46306d68e3b9560f (patch) | |
| tree | 279d9fbf3953e6b8ddda824fd8aa56b318d82c4d /src/libstd/unicode.rs | |
| parent | bfbaadc694141935660fb73bbc1800389ede18e9 (diff) | |
| download | rust-7d786318a1b0f9315164716b46306d68e3b9560f.tar.gz rust-7d786318a1b0f9315164716b46306d68e3b9560f.zip | |
std: declared fns as pure where sensible
Diffstat (limited to 'src/libstd/unicode.rs')
| -rw-r--r-- | src/libstd/unicode.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libstd/unicode.rs b/src/libstd/unicode.rs index 5038721d26e..a3d11cbc55b 100644 --- a/src/libstd/unicode.rs +++ b/src/libstd/unicode.rs @@ -151,16 +151,16 @@ mod icu { #[link_name = "icuuc"] #[abi = "cdecl"] native mod libicu { - fn u_hasBinaryProperty(c: UChar32, which: UProperty) -> UBool; + pure fn u_hasBinaryProperty(c: UChar32, which: UProperty) -> UBool; } } -fn is_XID_start(c: char) -> bool { +pure fn is_XID_start(c: char) -> bool { ret icu::libicu::u_hasBinaryProperty(c, icu::UCHAR_XID_START) == icu::TRUE; } -fn is_XID_continue(c: char) -> bool { +pure fn is_XID_continue(c: char) -> bool { ret icu::libicu::u_hasBinaryProperty(c, icu::UCHAR_XID_START) == icu::TRUE; } |
