Fix test helper function

This commit is contained in:
Matthias Beyer 2017-08-31 00:11:52 +02:00
parent a710a5b72b
commit 9094c22abf
1 changed files with 5 additions and 1 deletions

View File

@ -376,7 +376,11 @@ mod tests {
}
fn get_entry_links<'a>(entry: &'a FileLockEntry<'a>) -> TomlQueryResult<&'a Value> {
entry.get_header().read(&"imag.links".to_owned())
match entry.get_header().read(&"imag.links".to_owned()) {
Err(e) => Err(e),
Ok(Some(v)) => Ok(v),
Ok(None) => panic!("Didn't find 'imag.links' in {:?}", entry),
}
}
fn links_toml_value<'a, I: IntoIterator<Item = &'static str>>(links: I) -> Value {