diff options
Diffstat (limited to 'lib/core/libimagstore/src')
-rw-r--r-- | lib/core/libimagstore/src/file_abstraction/stdio/mapper/json.rs | 4 | ||||
-rw-r--r-- | lib/core/libimagstore/src/lib.rs | 1 | ||||
-rw-r--r-- | lib/core/libimagstore/src/store.rs | 5 |
3 files changed, 5 insertions, 5 deletions
diff --git a/lib/core/libimagstore/src/file_abstraction/stdio/mapper/json.rs b/lib/core/libimagstore/src/file_abstraction/stdio/mapper/json.rs index 34da0a98..711005e9 100644 --- a/lib/core/libimagstore/src/file_abstraction/stdio/mapper/json.rs +++ b/lib/core/libimagstore/src/file_abstraction/stdio/mapper/json.rs @@ -85,7 +85,7 @@ impl Mapper for JsonMapper { .chain_err(|| SEK::VersionError) .and_then(|doc_vers| { // safe because cargo does not compile if crate version is not valid - let crate_version = ::semver::Version::parse(version!()).unwrap(); + let crate_version = ::semver::Version::parse(env!("CARGO_PKG_VERSION")).unwrap(); debug!("Document version vs. own version: {doc_vers} > {crate_vers}", doc_vers = doc_vers, @@ -144,7 +144,7 @@ impl Mapper for JsonMapper { } let doc = OutDocument { - version: String::from(version!()), + version: String::from(env!("CARGO_PKG_VERSION")), store: store, }; diff --git a/lib/core/libimagstore/src/lib.rs b/lib/core/libimagstore/src/lib.rs index 4ce4ccfb..0e441e67 100644 --- a/lib/core/libimagstore/src/lib.rs +++ b/lib/core/libimagstore/src/lib.rs @@ -36,7 +36,6 @@ )] #[macro_use] extern crate log; -#[macro_use] extern crate version; extern crate glob; #[macro_use] extern crate lazy_static; extern crate regex; diff --git a/lib/core/libimagstore/src/store.rs b/lib/core/libimagstore/src/store.rs index 05170838..a547e0ce 100644 --- a/lib/core/libimagstore/src/store.rs +++ b/lib/core/libimagstore/src/store.rs @@ -1076,7 +1076,8 @@ impl Header for Value { m.insert(String::from("imag"), { let mut imag_map = BTreeMap::<String, Value>::new(); - imag_map.insert(String::from("version"), Value::String(String::from(version!()))); + imag_map.insert(String::from("version"), + Value::String(String::from(env!("CARGO_PKG_VERSION")))); Value::Table(imag_map) }); @@ -1203,7 +1204,7 @@ mod test { let mut header = BTreeMap::new(); let sub = { let mut sub = BTreeMap::new(); - sub.insert("version".into(), Value::String(String::from(version!()))); + sub.insert("version".into(), Value::String(String::from(env!("CARGO_PKG_VERSION")))); Value::Table(sub) }; |