diff options
| author | Huon Wilson <dbau.pp+github@gmail.com> | 2013-06-10 00:44:58 +1000 |
|---|---|---|
| committer | Huon Wilson <dbau.pp+github@gmail.com> | 2013-06-10 23:02:54 +1000 |
| commit | c32fb53cf9ae20a657d17bd8e2f0b36863096583 (patch) | |
| tree | 928280b4bfcde6b9765de76f956624a735eafde9 /src/libsyntax/codemap.rs | |
| parent | b29cd22bce6325a60788ab84f989bd2e82fcaaf4 (diff) | |
| download | rust-c32fb53cf9ae20a657d17bd8e2f0b36863096583.tar.gz rust-c32fb53cf9ae20a657d17bd8e2f0b36863096583.zip | |
std: remove str::{len, slice, is_empty} in favour of methods.
Diffstat (limited to 'src/libsyntax/codemap.rs')
| -rw-r--r-- | src/libsyntax/codemap.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libsyntax/codemap.rs b/src/libsyntax/codemap.rs index 5f8d6e73cef..52f6e458db3 100644 --- a/src/libsyntax/codemap.rs +++ b/src/libsyntax/codemap.rs @@ -290,9 +290,9 @@ impl FileMap { let begin = begin.to_uint(); let end = match str::find_char_from(*self.src, '\n', begin) { Some(e) => e, - None => str::len(*self.src) + None => self.src.len() }; - str::slice(*self.src, begin, end).to_owned() + self.src.slice(begin, end).to_owned() } pub fn record_multibyte_char(&self, pos: BytePos, bytes: uint) { @@ -418,7 +418,7 @@ impl CodeMap { let begin = self.lookup_byte_offset(sp.lo); let end = self.lookup_byte_offset(sp.hi); assert_eq!(begin.fm.start_pos, end.fm.start_pos); - return str::slice(*begin.fm.src, + return begin.fm.src.slice( begin.pos.to_uint(), end.pos.to_uint()).to_owned(); } |
