Add more debug output

This commit is contained in:
Matthias Beyer 2019-06-23 16:00:33 +02:00
parent 45d0d2d3bb
commit 64b1d9c79c
2 changed files with 18 additions and 1 deletions

View file

@ -72,6 +72,8 @@ impl Link for Entry {
.map_err(Error::from)?
.unwrap_or_else(|| Default::default());
debug!("Partial deserialized: {:?}", partial);
let url = match partial.uri {
Some(uri) => uri,
None => return Ok(None),

View file

@ -229,7 +229,22 @@ mod tests {
assert!(e.add_url(&store, url.clone()).is_ok());
assert_eq!(1, e.get_urls(&store).unwrap().count());
debug!("{:?}", e);
debug!("Header: {:?}", e.get_header());
let urls = e.get_urls(&store);
let urls = match urls {
Err(e) => {
debug!("Error: {:?}", e);
assert!(false);
unreachable!()
},
Ok(urls) => urls.collect::<Vec<_>>(),
};
debug!("urls = {:?}", urls);
assert_eq!(1, urls.len());
assert_eq!(url, e.get_urls(&store).unwrap().next().unwrap().unwrap());
}