cleanup: replace as[_mut]_slice() calls with deref coercions

This commit is contained in:
Jorge Aparicio
2015-02-01 21:53:25 -05:00
parent 2c05354211
commit 17bc7d8d5b
289 changed files with 1372 additions and 1406 deletions

View File

@@ -360,7 +360,7 @@ impl<'a> StringReader<'a> {
pub fn nextnextch(&self) -> Option<char> {
let offset = self.byte_offset(self.pos).to_usize();
let s = self.filemap.src.as_slice();
let s = &*self.filemap.src;
if offset >= s.len() { return None }
let str::CharRange { next, .. } = s.char_range_at(offset);
if next < s.len() {