Remove offset_inbounds for an unsafe offset function

This commit is contained in:
Alex Crichton
2013-08-08 22:22:52 -07:00
parent 578e680477
commit e3662b1880
9 changed files with 37 additions and 109 deletions

View File

@@ -1092,7 +1092,7 @@ pub mod raw {
pub unsafe fn slice_unchecked<'a>(s: &'a str, begin: uint, end: uint) -> &'a str {
do s.as_imm_buf |sbuf, _n| {
cast::transmute(Slice {
data: sbuf.offset_inbounds(begin as int),
data: sbuf.offset(begin as int),
len: end - begin,
})
}