Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit c25d09a1 authored by Jeff Vander Stoep's avatar Jeff Vander Stoep
Browse files

Use usize instead of c_long in Rust code

Needed to upgrade bindgen from 0.59.0 to 0.63.0. Resolves the
following errors:

error[E0308]: mismatched types
  --> frameworks/native/libs/binder/rust/src/parcel/parcelable.rs:91:22
   |
91 |                 Some(serialize_element::<Self>),
   |                 ---- ^^^^^^^^^^^^^^^^^^^^^^^^^ expected `usize`, found `u64
`
   |                 |
   |                 arguments to this enum variant are incorrect
   |
   = note: expected fn pointer `unsafe extern "C" fn(_, _, usize) -> _`
                 found fn item `unsafe extern "C" fn(_, _, u64) -> _ {parcel::pa
rcelable::serialize_element::<Self>}`
note: tuple variant defined here

error[E0308]: mismatched types
   --> frameworks/native/libs/binder/rust/src/parcel/parcelable.rs:136:22
    |
136 |                 Some(deserialize_element::<Self>),
    |                 ---- ^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `usize`, found `
u64`
    |                 |
    |                 arguments to this enum variant are incorrect
    |
    = note: expected fn pointer `unsafe extern "C" fn(_, _, usize) -> _`
                  found fn item `unsafe extern "C" fn(_, _, u64) -> _ {parcel::p
arcelable::deserialize_element::<Self>}`

Test: Treehugger
Change-Id: I019e17bd8770da0574b2397f72e717419aa537cd
parent 1884da10
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment