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

Commit b415d7ee authored by Chris Wailes's avatar Chris Wailes
Browse files

Update code for Rust 1.82.0

Fixed instance of clippy::single-match.

Test: m out/soong/.intermediates/packages/modules/Bluetooth/system/gd/rust/topshim/macros/libtopshim_macros/linux_glibc_x86_64/libtopshim_macros.so.clippy
Bug: 369422063
Change-Id: I2a09cbb895cedd080287ea580be2a2180f15d4db
parent 53743c63
Loading
Loading
Loading
Loading
+6 −10
Original line number Diff line number Diff line
@@ -103,8 +103,7 @@ pub fn cb_variant(input: TokenStream) -> TokenStream {
        let ident = format_ident!("_{}", i);
        params.extend(quote! { #ident: #start, });

        match end {
            Some(v) => {
        if let Some(v) = end {
            // Argument needs an into translation if it doesn't match the start
            if start != v {
                args.extend(quote! { #end::from(#ident), });
@@ -112,9 +111,6 @@ pub fn cb_variant(input: TokenStream) -> TokenStream {
                args.extend(quote! {#ident,});
            }
        }
            // If there's no end type, just consume it instead.
            None => (),
        }
    }

    let mut stmts = proc_macro2::TokenStream::new();