1
Fork 0

cleanup: s/v.slice*()/&v[a..b]/g + remove redundant as_slice() calls

This commit is contained in:
Jorge Aparicio 2015-01-26 21:21:15 -05:00
parent d77f6d5366
commit bce81e2464
59 changed files with 156 additions and 160 deletions

View file

@ -94,7 +94,7 @@ pub fn demangle(writer: &mut Writer, s: &str) -> IoResult<()> {
($($pat:expr, => $demangled:expr),*) => ({
$(if rest.starts_with($pat) {
try!(writer.write_str($demangled));
rest = rest.slice_from($pat.len());
rest = &rest[$pat.len()..];
} else)*
{
try!(writer.write_str(rest));