mirror of
https://github.com/servo/servo.git
synced 2025-08-30 09:38:19 +01:00
clippy: Fix warnings in shared
and config
, fonts
, layout
, and layout_2020
components (#32674)
This commit is contained in:
parent
99c1f886b8
commit
4b63043c6a
20 changed files with 72 additions and 78 deletions
|
@ -2,7 +2,6 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use std::convert::TryInto;
|
||||
use std::os::raw::c_long;
|
||||
use std::sync::Arc;
|
||||
use std::{mem, ptr};
|
||||
|
@ -106,12 +105,11 @@ fn create_face(data: Arc<Vec<u8>>, face_index: u32) -> Result<FT_Face, &'static
|
|||
let library = FreeTypeLibraryHandle::get().lock();
|
||||
|
||||
// This is to support 32bit Android where FT_Long is defined as i32.
|
||||
let face_index = face_index.try_into().unwrap();
|
||||
let result = FT_New_Memory_Face(
|
||||
library.freetype_library,
|
||||
data.as_ptr(),
|
||||
data.len() as FT_Long,
|
||||
face_index,
|
||||
face_index as FT_Long,
|
||||
&mut face,
|
||||
);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue