Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
redox-os
stb_truetype-rs
Commits
77055823
Verified
Commit
77055823
authored
Aug 24, 2018
by
Alex Butler
Browse files
Avoid unsafe; use truncate
parent
42957464
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/lib.rs
View file @
77055823
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment