diff options
author | Matthias Beyer <mail@beyermatthias.de> | 2017-08-31 13:01:24 +0200 |
---|---|---|
committer | Matthias Beyer <mail@beyermatthias.de> | 2017-08-31 20:56:08 +0200 |
commit | 9a9a3f2f43aa531ac33bfbd679efd1bd894f54b8 (patch) | |
tree | bc95c5809583a2b44ce5f55fec196b4a0d1b750e /lib/domain/libimagmail | |
parent | cee0287ee2effe7d60a9df09555b49516ea65123 (diff) | |
parent | 9094c22abfe9158d378d82a564493f08f5d71810 (diff) |
Merge branch 'libimagstore/remove-unused' into integrate-remove-unused
The merge conflicts which were resolved may roll back some changes from
the merged branch (unknowingly).
These will be fixed in the next commits
Diffstat (limited to 'lib/domain/libimagmail')
-rw-r--r-- | lib/domain/libimagmail/Cargo.toml | 2 | ||||
-rw-r--r-- | lib/domain/libimagmail/src/lib.rs | 18 | ||||
-rw-r--r-- | lib/domain/libimagmail/src/mail.rs | 4 |
3 files changed, 20 insertions, 4 deletions
diff --git a/lib/domain/libimagmail/Cargo.toml b/lib/domain/libimagmail/Cargo.toml index f3ab1e88..69a434ea 100644 --- a/lib/domain/libimagmail/Cargo.toml +++ b/lib/domain/libimagmail/Cargo.toml @@ -16,8 +16,6 @@ homepage = "http://imag-pim.org" [dependencies] log = "0.3" email = "0.0.17" -semver = "0.5" -toml = "0.4.*" filters = "0.1.*" libimagstore = { version = "0.4.0", path = "../../../lib/core/libimagstore" } diff --git a/lib/domain/libimagmail/src/lib.rs b/lib/domain/libimagmail/src/lib.rs index 23c9e60f..14200eaf 100644 --- a/lib/domain/libimagmail/src/lib.rs +++ b/lib/domain/libimagmail/src/lib.rs @@ -17,10 +17,24 @@ // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA // +#![deny( + dead_code, + non_camel_case_types, + non_snake_case, + path_statements, + trivial_numeric_casts, + unstable_features, + unused_allocation, + unused_import_braces, + unused_imports, + unused_must_use, + unused_mut, + unused_qualifications, + while_true, +)] + #[macro_use] extern crate log; extern crate email; -extern crate semver; -extern crate toml; extern crate filters; #[macro_use] extern crate libimagerror; diff --git a/lib/domain/libimagmail/src/mail.rs b/lib/domain/libimagmail/src/mail.rs index d5f02cdf..8f2e05c5 100644 --- a/lib/domain/libimagmail/src/mail.rs +++ b/lib/domain/libimagmail/src/mail.rs @@ -55,6 +55,7 @@ impl<'a> Mail<'a> { /// Imports a mail from the Path passed pub fn import_from_path<P: AsRef<Path>>(store: &Store, p: P) -> Result<Mail> { + debug!("Importing Mail from path"); let h = MailHasher::new(); let f = RefFlags::default().with_content_hashing(true).with_permission_tracking(false); let p = PathBuf::from(p.as_ref()); @@ -62,6 +63,7 @@ impl<'a> Mail<'a> { store.create_with_hasher(p, f, h) .map_err_into(MEK::RefCreationError) .and_then(|reference| { + debug!("Build reference file: {:?}", reference); reference.fs_file() .map_err_into(MEK::RefHandlingError) .and_then(|path| File::open(path).map_err_into(MEK::IOError)) @@ -78,6 +80,7 @@ impl<'a> Mail<'a> { /// Opens a mail by the passed hash pub fn open<S: AsRef<str>>(store: &Store, hash: S) -> Result<Option<Mail>> { + debug!("Opening Mail by Hash"); store.get_by_hash(String::from(hash.as_ref())) .map_err_into(MEK::FetchByHashError) .map_err_into(MEK::FetchError) @@ -104,6 +107,7 @@ impl<'a> Mail<'a> { } pub fn get_field(&self, field: &str) -> Result<Option<String>> { + debug!("Getting field in mail: {:?}", field); self.1 .parsed() .map_err_into(MEK::MailParsingError) |