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

Commit 9aefa749 authored by Joel Galenson's avatar Joel Galenson Committed by Sonny Sasaka
Browse files

floss: Fix upgrading to bindgen 0.59.1.

Bindgen now seems to derive Debug for these, so remove these
definitions. Also upgrade Linux build to bindgen 0.59.

Bug: 193916778
Tag: #floss
Test: Build

Change-Id: I88409952fbc1e5b7957d2a415031715810dc4005
parent 138cf6ca
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -35,7 +35,7 @@ tokio-stream = "*"
bitflags ="*"

[build-dependencies]
bindgen = "0.57"
bindgen = "0.59"
pkg-config = "0.3"

[lib]
+4 −4
Original line number Diff line number Diff line
@@ -35,13 +35,13 @@ fn main() {
        .clang_args(clang_args)
        .enable_cxx_namespaces()
        .size_t_is_usize(true)
        .whitelist_type("(bt_|bthh_|btgatt_).*")
        .whitelist_function("(bt_|bthh_|btgatt_).*")
        .whitelist_function("hal_util_.*")
        .allowlist_type("(bt_|bthh_|btgatt_).*")
        .allowlist_function("(bt_|bthh_|btgatt_).*")
        .allowlist_function("hal_util_.*")
        // We must opaque out std:: in order to prevent bindgen from choking
        .opaque_type("std::.*")
        // Whitelist std::string though because we use it a lot
        .whitelist_type("std::string")
        .allowlist_type("std::string")
        .rustfmt_bindings(true)
        .derive_debug(true)
        .derive_partialeq(true)
+0 −14
Original line number Diff line number Diff line
@@ -22,20 +22,6 @@ pub type BtGattDbElement = bindings::btgatt_db_element_t;
pub type BtGattResponse = bindings::btgatt_response_t;
pub type BtGattTestParams = bindings::btgatt_test_params_t;

// TODO: Implement printing internal values.
impl std::fmt::Debug for BtGattReadParams {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        f.write_fmt(format_args!("BtGattReadParams"))
    }
}

// TODO: Implement printing internal values.
impl std::fmt::Debug for BtGattNotifyParams {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        f.write_fmt(format_args!("BtGattNotifyParams"))
    }
}

#[cxx::bridge(namespace = bluetooth::topshim::rust)]
pub mod ffi {
    #[derive(Debug, Copy, Clone)]