Update examples for switch to thiserror

To compensate for the removal of `failure`'s application friendly
`failure::Error` trait, this `anyhow` crate has been added as a
dev-dependency for the examples, but is by no means a necessity for
other crates downstream of CPAL.
This commit is contained in:
mitchmindtree 2019-10-13 12:36:49 +02:00
parent d9d4a906c9
commit 7b08cb0dae
5 changed files with 9 additions and 8 deletions

View file

@ -6,8 +6,8 @@
//! Uses a delay of `LATENCY_MS` milliseconds in case the default input and output streams are not
//! precisely synchronised.
extern crate anyhow;
extern crate cpal;
extern crate failure;
extern crate ringbuf;
use cpal::traits::{DeviceTrait, EventLoopTrait, HostTrait};
@ -15,7 +15,7 @@ use ringbuf::RingBuffer;
const LATENCY_MS: f32 = 150.0;
fn main() -> Result<(), failure::Error> {
fn main() -> Result<(), anyhow::Error> {
let host = cpal::default_host();
let event_loop = host.event_loop();