Avoid unsafe; use truncate

parent 42957464
......@@ -803,7 +803,7 @@ impl<Data: Deref<Target=[u8]>> FontInfo<Data> {
}
close_shape(&mut vertices[..], &mut num_vertices, was_off, start_off, sx, sy, scx, scy, cx, cy);
assert!(num_vertices <= vertices.len());
unsafe{vertices.set_len(num_vertices)};
vertices.truncate(num_vertices);
vertices
} else if number_of_contours == -1 {
// Compound shapes
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment