From 26b1b8e84ccc0e3732166a7c422f5b6832f3622e Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Fri, 18 Nov 2016 09:18:51 +0100 Subject: [PATCH] toml_ext::has_imag_version_in_main_section() must be pub to be used in tests --- libimagstore/src/store.rs | 6 +++--- libimagstore/src/toml_ext.rs | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libimagstore/src/store.rs b/libimagstore/src/store.rs index 40b284c8..43914331 100644 --- a/libimagstore/src/store.rs +++ b/libimagstore/src/store.rs @@ -1176,7 +1176,7 @@ mod test { #[test] fn test_main_section_without_version() { - use super::has_imag_version_in_main_section; + use toml_ext::has_imag_version_in_main_section; let mut map = BTreeMap::new(); map.insert("imag".into(), Value::Table(BTreeMap::new())); @@ -1186,7 +1186,7 @@ mod test { #[test] fn test_main_section_with_version() { - use super::has_imag_version_in_main_section; + use toml_ext::has_imag_version_in_main_section; let mut map = BTreeMap::new(); let mut sub = BTreeMap::new(); @@ -1198,7 +1198,7 @@ mod test { #[test] fn test_main_section_with_version_in_wrong_type() { - use super::has_imag_version_in_main_section; + use toml_ext::has_imag_version_in_main_section; let mut map = BTreeMap::new(); let mut sub = BTreeMap::new(); diff --git a/libimagstore/src/toml_ext.rs b/libimagstore/src/toml_ext.rs index 3625f213..1ac4cf11 100644 --- a/libimagstore/src/toml_ext.rs +++ b/libimagstore/src/toml_ext.rs @@ -433,7 +433,7 @@ pub fn has_main_section(t: &Table) -> bool { t.contains_key("imag") && is_match!(t.get("imag"), Some(&Value::Table(_))) } -fn has_imag_version_in_main_section(t: &Table) -> bool { +pub fn has_imag_version_in_main_section(t: &Table) -> bool { use semver::Version; match *t.get("imag").unwrap() {