Version bump to 0.3.1
I screwed up 0.3.0 and yanked it, so this is 0.3.1
Add a delete function to remove mail files
add a function to move a message from new to cur and add flags as one operation
Version bump to 0.2 and publish
tests: Fix clippy warning
This does not really improve code quality, but does not make the code
Improve error handling in example
This makes the code a bit more modular, by leaving actual error
response up to `main`, and avoids calling `std::process::exit` from a
nested scope, which would prevent destructors from running.
Bump `mailparse` and `nix` dependencies
Use the latest versions; no changes required.
store_new and store_cur_with_flags now return the id of the inserted mail
Previously there was no trivial way how one could get the id of a freshly
inserted email. This commit modifies the return type of Maildir::store to
Result<String, MaildirError>, and returns the id on success.
The smoke test for store_new was modified to verify that the id is actually the
Correct TEST_MAIL_BODY (first characters of each line were missing)
This example email was probably yanked incorrectly in
This commit restores the previous state.
Add license text
Make tests concurrency-safe
The tests now all operate on a temporary directory, potentially
containing the contents of the "testdata" directory. The contents is
not copied as-is, but destination filenames are derived via
percent-decoding from the source filenames.
This allows the tests to safely run concurrently, so the flags
enforcing single-threaded execution have been removed from the CI
Extending the API slightly, this commit also adds a `Maildir::path`
method, which came handy when refactoring the tests.
Pull tests out to a separate file
The tests are all written against the public API, so let's put them in
their own file, so they will be compiled separately, enforcing the API
Modernize `Error` trait implementations
Implement the newer, more flexible `source()` instead of
`cause()`. This also eliminates a deprecation warning regarding
missing `dyn` keywords on nightly.
Fix all clippy warnings
This fixes all warnings emitted by
cargo clippy --all-features --all-targets -- -D warnings
It also adds a CI job to run clippy like that.
Switch to 2018 edition
Not much to see here, just the `extern crate` statements are gone.
Use the question mark instead of `try!`