| Age | Commit message (Collapse) | Author | 
 | 
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.
 | 
 | 
Order them like imports, with `std` errors first, followed by extern
crate errors, followed by local errors, alphabetically.
 | 
 | 
I was getting these warnings:
    warning: unreachable pattern
      --> src/trial.rs:41:17
       |
    40 |                 DurationError => return trial_expired(),
       |                 ------------- matches any value
    41 |                 e => {
       |                 ^ unreachable pattern
    warning: unreachable pattern
      --> src/trial.rs:55:9
       |
    54 |         DurationError => trial_expired(),
       |         ------------- matches any value
    55 |         Err(e) => (),
       |         ^^^^^^ unreachable pattern
Wasn't correctly matching the `DurationError`s.
Add an 'error-chain' `ErrorKind` for `DurationError` to make it the same
type as the others matched in the first `match` pattern.
 | 
 | 
Reads the encrypted timestamp from the trial file and returns a
`DateTime`.
 | 
 | 
Save an encoded timestamp to a file. This function should be run once if
no trial file is found. The encoded timestamp can then be read on
subsequent launches to determine whether the trial period is still in
effect.
Also add a few function stubs for other actions that seem relevant.
 | 
 | 
Make a custom error type because it's trickier to integrate with
'error-chain' given that 'magic-crypt''s `Error` type doesn't implement
the `std::error::Error` trait.
For the same reason, we can't use that as the `cause` for
`DateCryptError::Decrypt`.
This allows us to capture the errors without panicking.
Include some additional cleanups as a result of removing the `use
std::result` and `use errors::*` imports.
 | 
 | 
This new module will contain functions to calculate trial days.
Here we implement a function to calculate the days remaining in a trial
period.
If there are less than 0 days remaining, it returns an error result.
Couldn't use 'error-chain' because it was complaining about `Debug` and
`PartialEq` not being defined. Don't know if it's possible to implement
those traits on 'error-chain''s ErrorKind`, but it was complicated
enough that I ended up not bothering. Went with 'quick_error' instead to
create a custom error type without having to `impl` all the required
traits.
 | 
 | 
Use XDG handling from `state_load_map_group()` to do basically the same
thing here for reading the config from a `config.toml` file.
Use 'error-chain' to handle the `Result`s more easily. No more nested
pattern matching, we'll just have to unwrap one `Result` and write the
error to stderr in an FFI function.
 |