diff options
| author | Teddy Wing | 2018-10-28 19:53:50 +0100 | 
|---|---|---|
| committer | Teddy Wing | 2018-10-28 19:53:50 +0100 | 
| commit | e8ba4dc878a44f14e656664fa2e9d0ea362cbc10 (patch) | |
| tree | 000e1b8467b352f40c15a9502c61f8fad858b5e2 /src/errors.rs | |
| parent | eb261f29d0ae15c2f941c2d84972bd321bf764ac (diff) | |
| download | dome-key-map-e8ba4dc878a44f14e656664fa2e9d0ea362cbc10.tar.bz2 | |
Add `play_audio()` function
Create a new function that encapsulates the code we experimented with
for playing audio.
Clean up what we had and handle errors by passing them back in a
`Result`.
This allows us to encapsulate, audio playing so we can do it in a single
action during mode switching.
Diffstat (limited to 'src/errors.rs')
| -rw-r--r-- | src/errors.rs | 2 | 
1 files changed, 2 insertions, 0 deletions
| diff --git a/src/errors.rs b/src/errors.rs index f7f3d79..3426cac 100644 --- a/src/errors.rs +++ b/src/errors.rs @@ -1,11 +1,13 @@  use chrono;  use magic_crypt; +use rodio;  use xdg;  error_chain! {      foreign_links {          Io(::std::io::Error); +        Rodio(rodio::decoder::DecoderError);          Xdg(xdg::BaseDirectoriesError);          DateCrypt(DateCryptError); | 
