Skip to content
Permalink
Browse files

Remove remaining casts

  • Loading branch information...
lopopolo committed Jan 27, 2019
1 parent 2263c80 commit 1e41ca3c613ef67ec7c4491cc4941a5ef551955d
Showing with 3 additions and 3 deletions.
  1. +2 −2 cast-client/src/task.rs
  2. +1 −1 punchtop-playlist/src/fs/mod.rs
@@ -19,10 +19,10 @@ pub fn keepalive(
Interval::new_interval(Duration::new(5, 0))
.cancel(valve)
.map(|_| Command::Ping)
.or_else(|err| {
.or_else(|err| -> Result<Command, ()> {
warn!("Error on heartbeat interval: {:?}", err);
// Attempt to recover from errors on the heartbeat channel
Ok(Command::Ping) as Result<Command, ()>
Ok(Command::Ping)
})
.forward(command.sink_map_err(|err| warn!("Error on sink heartbeat: {:?}", err)))
.map(|_| ())
@@ -161,7 +161,7 @@ impl punchtop_audio::Track for Track {

fn stream(&self) -> Option<Box<dyn Read>> {
let file = File::open(&self.path).ok()?;
Some(Box::new(file) as Box<dyn Read>)
Some(Box::new(file))
}

fn content_type(&self) -> String {

0 comments on commit 1e41ca3

Please sign in to comment.
You can’t perform that action at this time.