Made more stuff pure.

escape functions in char, io.with_str_reader, base64 and md5sum, cell.empty_cell
and is_empty.
This commit is contained in:
Jesse Jones
2012-11-17 10:13:11 -08:00
committed by Brian Anderson
parent 15989ecb13
commit 6d99a2f8a9
5 changed files with 105 additions and 101 deletions

View File

@@ -512,7 +512,7 @@ pub pure fn with_bytes_reader<t>(bytes: &[u8], f: fn(Reader) -> t) -> t {
f(BytesReader { bytes: bytes, pos: 0u } as Reader)
}
pub fn with_str_reader<T>(s: &str, f: fn(Reader) -> T) -> T {
pub pure fn with_str_reader<T>(s: &str, f: fn(Reader) -> T) -> T {
str::byte_slice(s, |bytes| with_bytes_reader(bytes, f))
}