Build with latest libs
This commit is contained in:
@@ -126,7 +126,7 @@ impl AudioFrontend for AlsaBackend {
|
||||
}
|
||||
|
||||
fn card_name(&self) -> Result<String> {
|
||||
return self.acard.borrow().card.get_name().from_err();
|
||||
return Ok(self.acard.borrow().card.get_name()?);
|
||||
}
|
||||
|
||||
fn chan_name(&self) -> Result<String> {
|
||||
|
||||
@@ -95,7 +95,7 @@ pub fn alsa_card_has_playable_selem(card: &Card) -> bool {
|
||||
|
||||
/// Get the `Mixer` for the given alsa card.
|
||||
pub fn get_mixer(card: &Card) -> Result<Mixer> {
|
||||
return Mixer::new(&format!("hw:{}", card.get_index()), false).from_err();
|
||||
return Ok(Mixer::new(&format!("hw:{}", card.get_index()), false)?);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -24,9 +24,8 @@ pub fn execute_vol_control_command(prefs: &Prefs) -> Result<()> {
|
||||
|
||||
/// Try to execute the given command asynchronously via gtk.
|
||||
pub fn execute_command(cmd: &str) -> Result<()> {
|
||||
return glib::spawn_command_line_async(cmd)
|
||||
return Ok(glib::spawn_command_line_async(cmd)
|
||||
.map_err(|e| {
|
||||
std::io::Error::new(std::io::ErrorKind::Other, e.description())
|
||||
})
|
||||
.from_err();
|
||||
})?);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user