Skip to content

Commit e1bc9af

Browse files
authored
Fix wrong deref
1 parent ce5e49f commit e1bc9af

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/libstd/sys_common/wtf8.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -600,15 +600,15 @@ impl Wtf8 {
600600
#[inline]
601601
fn final_lead_surrogate(&self) -> Option<u16> {
602602
match self.bytes {
603-
[.., 0xED, b2 @ 0xA0..=0xAF, b3] => Some(decode_surrogate(*b2, *b3)),
603+
[.., 0xED, b2 @ 0xA0..=0xAF, b3] => Some(decode_surrogate(b2, b3)),
604604
_ => None,
605605
}
606606
}
607607

608608
#[inline]
609609
fn initial_trail_surrogate(&self) -> Option<u16> {
610610
match self.bytes {
611-
[0xED, b2 @ 0xB0..=0xBF, b3, ..] => Some(decode_surrogate(*b2, *b3)),
611+
[0xED, b2 @ 0xB0..=0xBF, b3, ..] => Some(decode_surrogate(b2, b3)),
612612
_ => None,
613613
}
614614
}

0 commit comments

Comments
 (0)