address review comments

This commit is contained in:
Ariel Ben-Yehuda 2016-06-06 00:20:15 +03:00
parent 5af5f26753
commit 8ac3b46cac
2 changed files with 6 additions and 6 deletions

View File

@ -199,7 +199,7 @@ pub fn trans_lvalue(&mut self,
let base_ty = self.lvalue_ty(lvalue);
let llbasety = type_of::type_of(bcx.ccx(), base_ty).ptr_to();
let llbase = bcx.pointercast(llbase, llbasety);
(bcx.pointercast(llbase, llbasety), ptr::null_mut())
(llbase, ptr::null_mut())
}
ty::TySlice(..) => {
assert!(tr_base.llextra != ptr::null_mut());

View File

@ -568,7 +568,7 @@ fn final_lead_surrogate(&self) -> Option<u16> {
return None
}
if self.bytes[len-3] == 0xed &&
self.bytes[len-2] > 0xa0 &&
self.bytes[len-2] >= 0xa0 &&
self.bytes[len-2] <= 0xaf
{
Some(decode_surrogate(self.bytes[len-2], self.bytes[len-1]))
@ -583,11 +583,11 @@ fn initial_trail_surrogate(&self) -> Option<u16> {
if len < 3 {
return None
}
if self.bytes[len-3] == 0xed &&
self.bytes[len-2] > 0xb0 &&
self.bytes[len-2] <= 0xbf
if self.bytes[0] == 0xed &&
self.bytes[1] >= 0xb0 &&
self.bytes[1] <= 0xbf
{
Some(decode_surrogate(self.bytes[len-2], self.bytes[len-1]))
Some(decode_surrogate(self.bytes[1], self.bytes[2]))
} else {
None
}