diff options
| -rw-r--r-- | .travis.yml | 4 | ||||
| -rw-r--r-- | Cargo.toml | 5 | ||||
| -rw-r--r-- | src/database.rs | 4 | ||||
| -rw-r--r-- | src/message.rs | 5 |
4 files changed, 13 insertions, 5 deletions
diff --git a/.travis.yml b/.travis.yml index 67e3a01..ab21b0a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,3 +9,7 @@ addons: apt: packages: - libnotmuch-dev + +script: + - cargo build --no-default-features --verbose --all + - cargo test --no-default-features --verbose --all @@ -15,6 +15,11 @@ travis-ci = { repository = "vhdirk/notmuch-rs" } libc = "0.2" clippy = { version = "0.0.193", optional = true } +[features] +v0_21 = [] +v0_26 = ["v0_21"] +default = ["v0_26"] + [[test]] name = "main" diff --git a/src/database.rs b/src/database.rs index 34fe4fd..a597b2d 100644 --- a/src/database.rs +++ b/src/database.rs @@ -1,7 +1,7 @@ use std::ops::Drop; use std::ptr; use std::path::Path; -use std::ffi::CString; +use std::ffi::{CStr, CString}; use libc; @@ -124,7 +124,7 @@ impl Database { }) } - #[cfg(feature = "0.21")] + #[cfg(feature = "v0_21")] pub fn revision(&self) -> Revision { let uuid_p: *const libc::c_char = ptr::null(); let revision = unsafe { diff --git a/src/message.rs b/src/message.rs index c3b100f..d28257c 100644 --- a/src/message.rs +++ b/src/message.rs @@ -45,9 +45,8 @@ impl<'q, 'd> Message<'q, 'd>{ }) } - #[cfg(feature = "0.26")] - pub fn count_files(self: &Self) -> i32 - { + #[cfg(feature = "v0_26")] + pub fn count_files(self: &Self) -> i32{ unsafe { ffi::notmuch_message_count_files(self.0) } |
