Skip to content

Commit 2251b3b

Browse files
committed
fix(rustup): unchecked_get
Closes #219 Closes #222
1 parent 5dd4529 commit 2251b3b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/header/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -573,7 +573,7 @@ mod tests {
573573
return None;
574574
}
575575
// we JUST checked that raw.len() == 1, so raw[0] WILL exist.
576-
match from_utf8(unsafe { raw.as_slice().unsafe_get(0).as_slice() }) {
576+
match from_utf8(unsafe { raw[].get_unchecked(0)[] }) {
577577
Ok(s) => FromStr::from_str(s),
578578
Err(_) => None
579579
}.map(|u| CrazyLength(Some(false), u))

0 commit comments

Comments
 (0)