Two compile errors occur when using the example code from that page.
error[E0308]: mismatched types
--> src\main.rs:23:32
|
23 | source_data_len_bytes: size_of_val(&CGA_8X8_THICK) as usize,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `u16`, found `usize`
error[E0308]: mismatched types
--> src\main.rs:30:24
|
30 | unsafe { BitUnPack(CGA_8X8_THICK.as_ptr(), 0x0600_0000 as *mut u32, &info) };
| ^^^^^^^^^^^^^^^^^^^^^^ expected `u8`, found `u32`
|
= note: expected raw pointer `*const u8`
found raw pointer `*const u32`
For more information about this error, try `rustc --explain E0308`.
error: could not compile `g-major` due to 2 previous errors
The first error can be silenced by changing the cast to as u16, though I do not know if this is a correct change.
Two compile errors occur when using the example code from that page.
The first error can be silenced by changing the cast to
as u16
, though I do not know if this is a correct change.