Skip to content

Commit e515d1d

Browse files
committed
More unsafe
1 parent 080eeb1 commit e515d1d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/day17.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ unsafe fn inner_part1(s: &[u8]) -> &'static str {
6969

7070
let out_len = unsafe { out_ptr.offset_from(result_ptr) };
7171

72-
unsafe { str::from_utf8(&RESULT[..(out_len - 1) as usize]).unwrap() }
72+
unsafe { str::from_utf8_unchecked(&RESULT[..(out_len - 1) as usize]) }
7373
}
7474

7575
const fn find_a_r(p: &[u64], x: u64, y: u64, pa: u64) -> Option<u64> {

0 commit comments

Comments
 (0)