Format gfx platform #21373

This commit is contained in:
kingdido999 2018-09-05 08:39:05 +08:00
parent 5063ac465b
commit c57c99d9f7
13 changed files with 496 additions and 372 deletions

View file

@ -23,7 +23,9 @@ mod freetype {
/// Creates a String from the given null-terminated buffer.
/// Panics if the buffer does not contain UTF-8.
unsafe fn c_str_to_string(s: *const c_char) -> String {
str::from_utf8(CStr::from_ptr(s).to_bytes()).unwrap().to_owned()
str::from_utf8(CStr::from_ptr(s).to_bytes())
.unwrap()
.to_owned()
}
pub mod font;