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

Commit faf3b0ae authored by Hsin-chen Chuang's avatar Hsin-chen Chuang Committed by Gerrit Code Review
Browse files

Merge changes Iae60ca04,If7e0d65e,I16a15cdf into main

* changes:
  floss: Introduce DisplayUuid to avoid logging full UUID
  floss: dbus_macros: Call DBusArg::log to elements and revise {:?} usage
  floss: Remove redundant `String::from(format!(...))`
parents 10b7b3dd 37f3b01c
Loading
Loading
Loading
Loading
+10 −10
Original line number Original line Diff line number Diff line
@@ -206,13 +206,13 @@ fn read_propmap_value<T: 'static + DirectDBus>(
) -> Result<T, Box<dyn std::error::Error>> {
) -> Result<T, Box<dyn std::error::Error>> {
    let output = propmap
    let output = propmap
        .get(key)
        .get(key)
        .ok_or(Box::new(DBusArgError::new(String::from(format!("Key {} does not exist", key,)))))?;
        .ok_or(Box::new(DBusArgError::new(format!("Key {} does not exist", key,))))?;
    let output = <T as RefArgToRust>::ref_arg_to_rust(
    let output = <T as RefArgToRust>::ref_arg_to_rust(
        output.as_static_inner(0).ok_or(Box::new(DBusArgError::new(String::from(format!(
        output.as_static_inner(0).ok_or(Box::new(DBusArgError::new(format!(
            "Unable to convert propmap[\"{}\"] to {}",
            "Unable to convert propmap[\"{}\"] to {}",
            key,
            key,
            stringify!(T),
            stringify!(T),
        )))))?,
        ))))?,
        String::from(stringify!(T)),
        String::from(stringify!(T)),
    )?;
    )?;
    Ok(output)
    Ok(output)
@@ -227,13 +227,13 @@ where
{
{
    let output = propmap
    let output = propmap
        .get(key)
        .get(key)
        .ok_or(Box::new(DBusArgError::new(String::from(format!("Key {} does not exist", key,)))))?;
        .ok_or(Box::new(DBusArgError::new(format!("Key {} does not exist", key,))))?;
    let output = <<T as DBusArg>::DBusType as RefArgToRust>::ref_arg_to_rust(
    let output = <<T as DBusArg>::DBusType as RefArgToRust>::ref_arg_to_rust(
        output.as_static_inner(0).ok_or(Box::new(DBusArgError::new(String::from(format!(
        output.as_static_inner(0).ok_or(Box::new(DBusArgError::new(format!(
            "Unable to convert propmap[\"{}\"] to {}",
            "Unable to convert propmap[\"{}\"] to {}",
            key,
            key,
            stringify!(T),
            stringify!(T),
        )))))?,
        ))))?,
        format!("{}", stringify!(T)),
        format!("{}", stringify!(T)),
    )?;
    )?;
    let output = T::from_dbus(output, None, None, None)?;
    let output = T::from_dbus(output, None, None, None)?;
@@ -490,18 +490,18 @@ impl DBusArg for ScanFilterCondition {
        let variant = match data.get("patterns") {
        let variant = match data.get("patterns") {
            Some(variant) => variant,
            Some(variant) => variant,
            None => {
            None => {
                return Err(Box::new(DBusArgError::new(String::from(format!(
                return Err(Box::new(DBusArgError::new(String::from(
                    "ScanFilterCondition does not contain any enum variant",
                    "ScanFilterCondition does not contain any enum variant",
                )))));
                ))));
            }
            }
        };
        };


        match variant.arg_type() {
        match variant.arg_type() {
            dbus::arg::ArgType::Variant => {}
            dbus::arg::ArgType::Variant => {}
            _ => {
            _ => {
                return Err(Box::new(DBusArgError::new(String::from(format!(
                return Err(Box::new(DBusArgError::new(String::from(
                    "ScanFilterCondition::Patterns must be a variant",
                    "ScanFilterCondition::Patterns must be a variant",
                )))));
                ))));
            }
            }
        };
        };


+1 −1
Original line number Original line Diff line number Diff line
@@ -272,7 +272,7 @@ impl ClientContext {
        // Trigger callback registration in the foreground
        // Trigger callback registration in the foreground
        let fg = self.fg.clone();
        let fg = self.fg.clone();
        tokio::spawn(async move {
        tokio::spawn(async move {
            let adapter = String::from(format!("adapter{}", idx));
            let adapter = format!("adapter{}", idx);
            // Floss won't export the interface until it is ready to be used.
            // Floss won't export the interface until it is ready to be used.
            // Wait 1 second before registering the callbacks.
            // Wait 1 second before registering the callbacks.
            sleep(Duration::from_millis(1000)).await;
            sleep(Duration::from_millis(1000)).await;
+52 −30
Original line number Original line Diff line number Diff line
@@ -213,7 +213,7 @@ pub fn generate_dbus_exporter(attr: TokenStream, item: TokenStream) -> TokenStre
                        if !args_debug_format.is_empty() {
                        if !args_debug_format.is_empty() {
                            args_debug_format.push_str(", ");
                            args_debug_format.push_str(", ");
                        }
                        }
                        args_debug_format.push_str("{:?}");
                        args_debug_format.push_str("|{}|");
                    }
                    }
                }
                }
            }
            }
@@ -634,10 +634,10 @@ pub fn dbus_propmap(attr: TokenStream, item: TokenStream) -> TokenStream {
            match #field_ident.arg_type() {
            match #field_ident.arg_type() {
                dbus::arg::ArgType::Variant => {}
                dbus::arg::ArgType::Variant => {}
                _ => {
                _ => {
                    return Err(Box::new(DBusArgError::new(String::from(format!(
                    return Err(Box::new(DBusArgError::new(format!(
                        "{}.{} must be a variant",
                        "{}.{} must be a variant",
                        #struct_str, #field_str
                        #struct_str, #field_str
                    )))));
                    ))));
                }
                }
            };
            };
            let #field_ident = <<#field_type as DBusArg>::DBusType as RefArgToRust>::ref_arg_to_rust(
            let #field_ident = <<#field_type as DBusArg>::DBusType as RefArgToRust>::ref_arg_to_rust(
@@ -659,10 +659,10 @@ pub fn dbus_propmap(attr: TokenStream, item: TokenStream) -> TokenStream {
            let #field_ident = match data__.get(#field_str) {
            let #field_ident = match data__.get(#field_str) {
                Some(data) => data,
                Some(data) => data,
                None => {
                None => {
                    return Err(Box::new(DBusArgError::new(String::from(format!(
                    return Err(Box::new(DBusArgError::new(format!(
                        "{}.{} is required",
                        "{}.{} is required",
                        #struct_str, #field_str
                        #struct_str, #field_str
                    )))));
                    ))));
                }
                }
            };
            };
            #make_field
            #make_field
@@ -678,7 +678,7 @@ pub fn dbus_propmap(attr: TokenStream, item: TokenStream) -> TokenStream {
            log_format.push_str(", ");
            log_format.push_str(", ");
        }
        }
        log_format.push_str(field_str.as_str());
        log_format.push_str(field_str.as_str());
        log_format.push_str(": {:?}");
        log_format.push_str(": {}");


        log_args = quote! {
        log_args = quote! {
            #log_args
            #log_args
@@ -687,9 +687,9 @@ pub fn dbus_propmap(attr: TokenStream, item: TokenStream) -> TokenStream {
    }
    }


    // Give an example type: struct BluetoothDevice { address: RawAddress, name: String }
    // Give an example type: struct BluetoothDevice { address: RawAddress, name: String }
    // At this point the |log_format| would be: "address: {:?}, name: {:?}"
    // At this point the |log_format| would be: "address: {}, name: {}"
    // Now, wrap it with curly braces and prepend the structure name so it becomes:
    // Now, wrap it with curly braces and prepend the structure name so it becomes:
    //     "BluetoothDevice { address: {:?}, name: {:?} }"
    //     "BluetoothDevice { address: {}, name: {} }"
    log_format.insert_str(0, " {{ ");
    log_format.insert_str(0, " {{ ");
    log_format.push_str(" }}");
    log_format.push_str(" }}");
    log_format.insert_str(0, struct_ident.to_string().as_str());
    log_format.insert_str(0, struct_ident.to_string().as_str());
@@ -822,7 +822,7 @@ pub fn dbus_proxy_obj(attr: TokenStream, item: TokenStream) -> TokenStream {
                        if !args_debug_format.is_empty() {
                        if !args_debug_format.is_empty() {
                            args_debug_format.push_str(", ");
                            args_debug_format.push_str(", ");
                        }
                        }
                        args_debug_format.push_str("{:?}");
                        args_debug_format.push_str("|{}|");
                    }
                    }
                }
                }
            }
            }
@@ -992,7 +992,7 @@ pub fn dbus_proxy_obj(attr: TokenStream, item: TokenStream) -> TokenStream {
            }
            }


            fn log(_data: &Box<dyn #trait_ + Send>) -> String {
            fn log(_data: &Box<dyn #trait_ + Send>) -> String {
                String::from(format!("Box<dyn>"))
                format!("Box<dyn>")
            }
            }
        }
        }
    };
    };
@@ -1071,12 +1071,12 @@ pub fn generate_dbus_arg(_item: TokenStream) -> TokenStream {
            ) -> Result<Self::RustType, Box<dyn Error>> {
            ) -> Result<Self::RustType, Box<dyn Error>> {
                let any = arg.as_any();
                let any = arg.as_any();
                if !any.is::<<Self as DBusArg>::DBusType>() {
                if !any.is::<<Self as DBusArg>::DBusType>() {
                    return Err(Box::new(DBusArgError::new(String::from(format!(
                    return Err(Box::new(DBusArgError::new(format!(
                        "{} type does not match: expected {}, found {}",
                        "{} type does not match: expected {}, found {}",
                        name,
                        name,
                        std::any::type_name::<<Self as DBusArg>::DBusType>(),
                        std::any::type_name::<<Self as DBusArg>::DBusType>(),
                        arg.arg_type().as_str(),
                        arg.arg_type().as_str(),
                    )))));
                    ))));
                }
                }
                let arg = (*any.downcast_ref::<<Self as DBusArg>::DBusType>().unwrap()).clone();
                let arg = (*any.downcast_ref::<<Self as DBusArg>::DBusType>().unwrap()).clone();
                return Ok(arg);
                return Ok(arg);
@@ -1092,16 +1092,16 @@ pub fn generate_dbus_arg(_item: TokenStream) -> TokenStream {
            ) -> Result<Self::RustType, Box<dyn Error>> {
            ) -> Result<Self::RustType, Box<dyn Error>> {
                let any = arg.as_any();
                let any = arg.as_any();
                if !any.is::<<Self as DBusArg>::DBusType>() {
                if !any.is::<<Self as DBusArg>::DBusType>() {
                    return Err(Box::new(DBusArgError::new(String::from(format!(
                    return Err(Box::new(DBusArgError::new(format!(
                        "{} type does not match: expected {}, found {}",
                        "{} type does not match: expected {}, found {}",
                        name,
                        name,
                        std::any::type_name::<<Self as DBusArg>::DBusType>(),
                        std::any::type_name::<<Self as DBusArg>::DBusType>(),
                        arg.arg_type().as_str(),
                        arg.arg_type().as_str(),
                    )))));
                    ))));
                }
                }
                let arg = match (*any.downcast_ref::<<Self as DBusArg>::DBusType>().unwrap()).try_clone() {
                let arg = match (*any.downcast_ref::<<Self as DBusArg>::DBusType>().unwrap()).try_clone() {
                    Ok(foo) => foo,
                    Ok(foo) => foo,
                    Err(_) => return Err(Box::new(DBusArgError::new(String::from(format!("{} cannot clone file.", name))))),
                    Err(_) => return Err(Box::new(DBusArgError::new(format!("{} cannot clone file.", name)))),
                };
                };


                return Ok(arg);
                return Ok(arg);
@@ -1117,10 +1117,10 @@ pub fn generate_dbus_arg(_item: TokenStream) -> TokenStream {
                let mut map: dbus::arg::PropMap = std::collections::HashMap::new();
                let mut map: dbus::arg::PropMap = std::collections::HashMap::new();
                let mut iter = match arg.as_iter() {
                let mut iter = match arg.as_iter() {
                    None => {
                    None => {
                        return Err(Box::new(DBusArgError::new(String::from(format!(
                        return Err(Box::new(DBusArgError::new(format!(
                            "{} is not iterable",
                            "{} is not iterable",
                            name,
                            name,
                        )))))
                        ))))
                    }
                    }
                    Some(item) => item,
                    Some(item) => item,
                };
                };
@@ -1132,10 +1132,10 @@ pub fn generate_dbus_arg(_item: TokenStream) -> TokenStream {
                    let v = dbus::arg::Variant(
                    let v = dbus::arg::Variant(
                        val_clone
                        val_clone
                            .as_static_inner(0)
                            .as_static_inner(0)
                            .ok_or(Box::new(DBusArgError::new(String::from(format!(
                            .ok_or(Box::new(DBusArgError::new(format!(
                                "{}.{} is not a variant",
                                "{}.{} is not a variant",
                                name, k
                                name, k
                            )))))?
                            ))))?
                            .box_clone(),
                            .box_clone(),
                    );
                    );
                    map.insert(k, v);
                    map.insert(k, v);
@@ -1212,6 +1212,10 @@ pub fn generate_dbus_arg(_item: TokenStream) -> TokenStream {
        /// When implementing this trait for Rust container types (i.e. Option<T>),
        /// When implementing this trait for Rust container types (i.e. Option<T>),
        /// you must first select the D-Bus container type used (i.e. array, property map, etc) and
        /// you must first select the D-Bus container type used (i.e. array, property map, etc) and
        /// then implement the `from_dbus`, `to_dbus`, and `log` functions.
        /// then implement the `from_dbus`, `to_dbus`, and `log` functions.
        ///
        /// Note that when implementing `log` function for a container type, avoid using the "{:?}"
        /// Debug format because the `log` function could be recursively called and generate many
        /// backslashes.
        pub(crate) trait DBusArg {
        pub(crate) trait DBusArg {
            type DBusType;
            type DBusType;


@@ -1230,7 +1234,7 @@ pub fn generate_dbus_arg(_item: TokenStream) -> TokenStream {
        }
        }


        // Types that implement dbus::arg::Append do not need any conversion.
        // Types that implement dbus::arg::Append do not need any conversion.
        pub(crate) trait DirectDBus: Clone + std::fmt::Display {}
        pub(crate) trait DirectDBus: Clone + std::fmt::Debug {}
        impl DirectDBus for bool {}
        impl DirectDBus for bool {}
        impl DirectDBus for i32 {}
        impl DirectDBus for i32 {}
        impl DirectDBus for u32 {}
        impl DirectDBus for u32 {}
@@ -1258,7 +1262,7 @@ pub fn generate_dbus_arg(_item: TokenStream) -> TokenStream {
            }
            }


            fn log(data: &T) -> String {
            fn log(data: &T) -> String {
                String::from(format!("{}", data))
                format!("{:?}", data)
            }
            }
        }
        }


@@ -1282,11 +1286,11 @@ pub fn generate_dbus_arg(_item: TokenStream) -> TokenStream {
            }
            }


            fn log(data: &std::fs::File) -> String {
            fn log(data: &std::fs::File) -> String {
                String::from(format!("{:?}", data))
                format!("{:?}", data)
            }
            }
        }
        }


        impl<T: DBusArg> DBusArg for Vec<T> where T: std::fmt::Debug {
        impl<T: DBusArg> DBusArg for Vec<T> {
            type DBusType = Vec<T::DBusType>;
            type DBusType = Vec<T::DBusType>;


            fn from_dbus(
            fn from_dbus(
@@ -1318,7 +1322,14 @@ pub fn generate_dbus_arg(_item: TokenStream) -> TokenStream {
            }
            }


            fn log(data: &Vec<T>) -> String {
            fn log(data: &Vec<T>) -> String {
                String::from(format!("{:?}", data))
                format!(
                    "[{}]",
                    data
                        .iter()
                        .map(|d| <T as DBusArg>::log(d))
                        .collect::<Vec<String>>()
                        .join(", ")
                )
            }
            }
        }
        }


@@ -1327,7 +1338,6 @@ pub fn generate_dbus_arg(_item: TokenStream) -> TokenStream {
                <T as DBusArg>::DBusType: dbus::arg::RefArg
                <T as DBusArg>::DBusType: dbus::arg::RefArg
                    + 'static
                    + 'static
                    + RefArgToRust<RustType = <T as DBusArg>::DBusType>,
                    + RefArgToRust<RustType = <T as DBusArg>::DBusType>,
                T: std::fmt::Debug
        {
        {
            type DBusType = dbus::arg::PropMap;
            type DBusType = dbus::arg::PropMap;


@@ -1352,7 +1362,7 @@ pub fn generate_dbus_arg(_item: TokenStream) -> TokenStream {
                match prop_value.arg_type() {
                match prop_value.arg_type() {
                    dbus::arg::ArgType::Variant => (),
                    dbus::arg::ArgType::Variant => (),
                    _ => {
                    _ => {
                        return Err(Box::new(DBusArgError::new(String::from(format!("{} must be a variant", OPTION_KEY)))));
                        return Err(Box::new(DBusArgError::new(format!("{} must be a variant", OPTION_KEY))));
                    }
                    }
                };
                };


@@ -1384,7 +1394,11 @@ pub fn generate_dbus_arg(_item: TokenStream) -> TokenStream {
            }
            }


            fn log(data: &Option<T>) -> String {
            fn log(data: &Option<T>) -> String {
                String::from(format!("{:?}", data))
                if let Some(d) = data.as_ref() {
                    format!("Some({})", <T as DBusArg>::log(d))
                } else {
                    String::from("None")
                }
            }
            }
        }
        }


@@ -1395,8 +1409,6 @@ pub fn generate_dbus_arg(_item: TokenStream) -> TokenStream {
                    + Hash
                    + Hash
                    + dbus::arg::RefArg
                    + dbus::arg::RefArg
                    + RefArgToRust<RustType = <K as DBusArg>::DBusType>,
                    + RefArgToRust<RustType = <K as DBusArg>::DBusType>,
                K: std::fmt::Debug,
                V: std::fmt::Debug,
        {
        {
            type DBusType = std::collections::HashMap<K::DBusType, V::DBusType>;
            type DBusType = std::collections::HashMap<K::DBusType, V::DBusType>;


@@ -1440,7 +1452,17 @@ pub fn generate_dbus_arg(_item: TokenStream) -> TokenStream {
            }
            }


            fn log(data: &std::collections::HashMap<K, V>) -> String {
            fn log(data: &std::collections::HashMap<K, V>) -> String {
                String::from(format!("{:?}", data))
                format!(
                    "{{{}}}",
                    data.iter()
                        .map(|(k, v)| format!(
                            "{}: {}",
                            <K as DBusArg>::log(k),
                            <V as DBusArg>::log(v),
                        ))
                        .collect::<Vec<String>>()
                        .join(", ")
                )
            }
            }
        }
        }
    };
    };
+8 −8
Original line number Original line Diff line number Diff line
@@ -266,11 +266,11 @@ macro_rules! impl_dbus_arg_enum {
            ) -> Result<$enum_type, Box<dyn std::error::Error>> {
            ) -> Result<$enum_type, Box<dyn std::error::Error>> {
                match <$enum_type>::from_u32(data) {
                match <$enum_type>::from_u32(data) {
                    Some(x) => Ok(x),
                    Some(x) => Ok(x),
                    None => Err(Box::new(DBusArgError::new(String::from(format!(
                    None => Err(Box::new(DBusArgError::new(format!(
                        "error converting {} to {}",
                        "error converting {} to {}",
                        data,
                        data,
                        stringify!($enum_type)
                        stringify!($enum_type)
                    ))))),
                    )))),
                }
                }
            }
            }


@@ -279,7 +279,7 @@ macro_rules! impl_dbus_arg_enum {
            }
            }


            fn log(data: &$enum_type) -> String {
            fn log(data: &$enum_type) -> String {
                String::from(format!("{:?}", data))
                format!("{:?}", data)
            }
            }
        }
        }
    };
    };
@@ -300,28 +300,28 @@ macro_rules! impl_dbus_arg_from_into {
                >,
                >,
            ) -> Result<$rust_type, Box<dyn std::error::Error>> {
            ) -> Result<$rust_type, Box<dyn std::error::Error>> {
                match <$rust_type>::try_from(data.clone()) {
                match <$rust_type>::try_from(data.clone()) {
                    Err(e) => Err(Box::new(DBusArgError::new(String::from(format!(
                    Err(e) => Err(Box::new(DBusArgError::new(format!(
                        "error converting {:?} to {:?}",
                        "error converting {:?} to {:?}",
                        data,
                        data,
                        stringify!($rust_type),
                        stringify!($rust_type),
                    ))))),
                    )))),
                    Ok(result) => Ok(result),
                    Ok(result) => Ok(result),
                }
                }
            }
            }


            fn to_dbus(data: $rust_type) -> Result<$dbus_type, Box<dyn std::error::Error>> {
            fn to_dbus(data: $rust_type) -> Result<$dbus_type, Box<dyn std::error::Error>> {
                match data.clone().try_into() {
                match data.clone().try_into() {
                    Err(e) => Err(Box::new(DBusArgError::new(String::from(format!(
                    Err(e) => Err(Box::new(DBusArgError::new(format!(
                        "error converting {:?} to {:?}",
                        "error converting {:?} to {:?}",
                        data,
                        data,
                        stringify!($dbus_type)
                        stringify!($dbus_type)
                    ))))),
                    )))),
                    Ok(result) => Ok(result),
                    Ok(result) => Ok(result),
                }
                }
            }
            }


            fn log(data: &$rust_type) -> String {
            fn log(data: &$rust_type) -> String {
                String::from(format!("{:?}", data))
                format!("{:?}", data)
            }
            }
        }
        }
    };
    };
+10 −9
Original line number Original line Diff line number Diff line
use bt_topshim::btif::{
use bt_topshim::btif::{
    BtAddrType, BtBondState, BtConnectionState, BtDeviceType, BtDiscMode, BtPropertyType,
    BtAddrType, BtBondState, BtConnectionState, BtDeviceType, BtDiscMode, BtPropertyType,
    BtSspVariant, BtStatus, BtTransport, BtVendorProductInfo, DisplayAddress, RawAddress, Uuid,
    BtSspVariant, BtStatus, BtTransport, BtVendorProductInfo, DisplayAddress, DisplayUuid,
    RawAddress, Uuid,
};
};
use bt_topshim::profiles::socket::SocketType;
use bt_topshim::profiles::socket::SocketType;
use bt_topshim::profiles::ProfileConnectionState;
use bt_topshim::profiles::ProfileConnectionState;
@@ -62,7 +63,7 @@ impl DBusArg for Uuid {
    }
    }


    fn log(data: &Uuid) -> String {
    fn log(data: &Uuid) -> String {
        format!("{}", data)
        format!("{}", DisplayUuid(&data))
    }
    }
}
}


@@ -294,13 +295,13 @@ fn read_propmap_value<T: 'static + DirectDBus>(
) -> Result<T, Box<dyn std::error::Error>> {
) -> Result<T, Box<dyn std::error::Error>> {
    let output = propmap
    let output = propmap
        .get(key)
        .get(key)
        .ok_or(Box::new(DBusArgError::new(String::from(format!("Key {} does not exist", key,)))))?;
        .ok_or(Box::new(DBusArgError::new(format!("Key {} does not exist", key,))))?;
    let output = <T as RefArgToRust>::ref_arg_to_rust(
    let output = <T as RefArgToRust>::ref_arg_to_rust(
        output.as_static_inner(0).ok_or(Box::new(DBusArgError::new(String::from(format!(
        output.as_static_inner(0).ok_or(Box::new(DBusArgError::new(format!(
            "Unable to convert propmap[\"{}\"] to {}",
            "Unable to convert propmap[\"{}\"] to {}",
            key,
            key,
            stringify!(T),
            stringify!(T),
        )))))?,
        ))))?,
        String::from(stringify!(T)),
        String::from(stringify!(T)),
    )?;
    )?;
    Ok(output)
    Ok(output)
@@ -315,13 +316,13 @@ where
{
{
    let output = propmap
    let output = propmap
        .get(key)
        .get(key)
        .ok_or(Box::new(DBusArgError::new(String::from(format!("Key {} does not exist", key,)))))?;
        .ok_or(Box::new(DBusArgError::new(format!("Key {} does not exist", key,))))?;
    let output = <<T as DBusArg>::DBusType as RefArgToRust>::ref_arg_to_rust(
    let output = <<T as DBusArg>::DBusType as RefArgToRust>::ref_arg_to_rust(
        output.as_static_inner(0).ok_or(Box::new(DBusArgError::new(String::from(format!(
        output.as_static_inner(0).ok_or(Box::new(DBusArgError::new(format!(
            "Unable to convert propmap[\"{}\"] to {}",
            "Unable to convert propmap[\"{}\"] to {}",
            key,
            key,
            stringify!(T),
            stringify!(T),
        )))))?,
        ))))?,
        format!("{}", stringify!(T)),
        format!("{}", stringify!(T)),
    )?;
    )?;
    let output = T::from_dbus(output, None, None, None)?;
    let output = T::from_dbus(output, None, None, None)?;
@@ -433,7 +434,7 @@ impl DBusArg for BtSdpRecord {
    }
    }


    fn log(record: &BtSdpRecord) -> String {
    fn log(record: &BtSdpRecord) -> String {
        String::from(format!("{:?}", record))
        format!("{:?}", record)
    }
    }
}
}


Loading