Skip to content

Commit 301e0ac

Browse files
committed
Get slice unchecked
1 parent eeb6a8a commit 301e0ac

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
@@ -59,7 +59,7 @@ pub fn part1(s: &str) -> &'static str {
5959

6060
let out_len = out_ptr.offset_from(result_ptr);
6161

62-
str::from_utf8_unchecked(&RESULT[..(out_len - 1) as usize])
62+
str::from_utf8_unchecked((*&raw const RESULT).get_unchecked(..(out_len - 1) as usize))
6363
}
6464
}
6565

0 commit comments

Comments
 (0)