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

Commit 3e752657 authored by Hsin-chen Chuang's avatar Hsin-chen Chuang
Browse files

floss: Fix build warning: redundant clone to [u8]

Bug: 337195302
Tag: #floss
Test: mmm packages/modules/Bluetooth
Flag: EXEMPT, Floss-only changes
Change-Id: I5694255358146d48ef27d55d4918ac602f68be69
parent d362b840
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -80,9 +80,7 @@ impl TryFrom<&[u8]> for ConnectionComplete {
        // the native endianness of the machine when writing to the socket. When
        // parsing, make sure to use native endianness here.
        let (size_bytes, rest) = bytes.split_at(std::mem::size_of::<u16>());
        if u16::from_ne_bytes(size_bytes.clone().try_into().unwrap())
            != (CONNECT_COMPLETE_SIZE as u16)
        {
        if u16::from_ne_bytes(size_bytes.try_into().unwrap()) != (CONNECT_COMPLETE_SIZE as u16) {
            return Err(format!("Wrong size in Connection Complete: {:?}", size_bytes));
        }