diff options
author | Matthias Beyer <mail@beyermatthias.de> | 2018-03-03 13:51:55 +0100 |
---|---|---|
committer | Matthias Beyer <mail@beyermatthias.de> | 2018-03-06 12:45:41 +0100 |
commit | 579c00b62af47b9a4580d7af1f19f488f6bf2ffc (patch) | |
tree | 89f9d6fbdc5d828e4feae99a9c17b55ccc19481d /lib/core/libimagstore/src/file_abstraction/mod.rs | |
parent | 8c1a9ffe6792ca3f14b2a481161fc2bf040c38c8 (diff) |
Replace hard coded version strings with compiletime env
Diffstat (limited to 'lib/core/libimagstore/src/file_abstraction/mod.rs')
-rw-r--r-- | lib/core/libimagstore/src/file_abstraction/mod.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/core/libimagstore/src/file_abstraction/mod.rs b/lib/core/libimagstore/src/file_abstraction/mod.rs index 1b0cc490..f38b6590 100644 --- a/lib/core/libimagstore/src/file_abstraction/mod.rs +++ b/lib/core/libimagstore/src/file_abstraction/mod.rs @@ -112,11 +112,11 @@ mod test { let mut lf = InMemoryFileAbstractionInstance::new(fs.backend().clone(), path.clone()); let loca = StoreId::new_baseless(path).unwrap(); - let file = Entry::from_str(loca.clone(), r#"--- + let file = Entry::from_str(loca.clone(), &format!(r#"--- [imag] -version = "0.7.0" +version = "{}" --- -Hello World"#).unwrap(); +Hello World"#, env!("CARGO_PKG_VERSION"))).unwrap(); lf.write_file_content(&file).unwrap(); let bah = lf.get_file_content(loca).unwrap(); @@ -132,12 +132,12 @@ Hello World"#).unwrap(); let mut lf = InMemoryFileAbstractionInstance::new(fs.backend().clone(), path.clone()); let loca = StoreId::new_baseless(path).unwrap(); - let file = Entry::from_str(loca.clone(), r#"--- + let file = Entry::from_str(loca.clone(), &format!(r#"--- [imag] -version = "0.7.0" +version = "{}" --- Hello World -baz"#).unwrap(); +baz"#, env!("CARGO_PKG_VERSION"))).unwrap(); lf.write_file_content(&file).unwrap(); let bah = lf.get_file_content(loca).unwrap(); |