toml_ext::has_imag_version_in_main_section() must be pub to be used in tests

This commit is contained in:
Matthias Beyer 2016-11-18 09:18:51 +01:00
parent 58a42d127d
commit 26b1b8e84c
2 changed files with 4 additions and 4 deletions

View file

@ -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();

View file

@ -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() {