mirror of
https://github.com/encounter/rust-sdl2.git
synced 2026-07-10 21:18:41 -07:00
fix build error: change from_bits to from_bits_truncate, avoid Option<> wrapper
This commit is contained in:
@@ -145,7 +145,7 @@ pub fn init(flags: InitFlag) -> InitFlag {
|
||||
//! InitFlags were actually used.
|
||||
unsafe {
|
||||
let used = ffi::IMG_Init(flags.bits() as c_int);
|
||||
InitFlag::from_bits(used as u32)
|
||||
InitFlag::from_bits_truncate(used as u32)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user