Skip to content
This repository has been archived by the owner on Nov 2, 2020. It is now read-only.

Commit

Permalink
Remove remaining casts
Browse files Browse the repository at this point in the history
  • Loading branch information
lopopolo committed Jan 27, 2019
1 parent 2263c80 commit 1e41ca3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions cast-client/src/task.rs
Expand Up @@ -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(|_| ())
Expand Down
2 changes: 1 addition & 1 deletion punchtop-playlist/src/fs/mod.rs
Expand Up @@ -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 {
Expand Down

0 comments on commit 1e41ca3

Please sign in to comment.