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

Commit 2da5c703 authored by Abhishek Pandit-Subedi's avatar Abhishek Pandit-Subedi
Browse files

floss: Fix build breakage due to missing import

When using i8::try_from, use std::convert::TryFrom was necessary.

Bug: 193551555
Test: Linux build succeeds
Tag: #floss
Change-Id: I0bddec85cd5ca24ea219c127c4a6a905a77ba344
parent 93ef121c
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -9,6 +9,7 @@ use bt_topshim::profiles::avrcp::Avrcp;
use bt_topshim::topstack;

use std::collections::HashMap;
use std::convert::TryFrom;
use std::sync::Arc;
use std::sync::Mutex;

@@ -200,10 +201,10 @@ impl IBluetoothMedia for BluetoothMedia {
    }

    fn set_volume(&mut self, volume: i32) {
        let i8v = i8::try_from(volume);
        if i8v.is_ok() {
            self.avrcp.as_mut().unwrap().set_volume(i8::try_from(volume).ok().unwrap());
        }
        match i8::try_from(volume) {
            Ok(val) => self.avrcp.as_mut().unwrap().set_volume(val),
            _ => (),
        };
    }

    fn start_audio_request(&mut self) {