xmpp-parsers/blocking: Use .is_empty() instead of Vec’s PartialEq.

This commit is contained in:
Emmanuel Gil Peyrot 2020-12-10 20:36:54 +01:00
parent 7d19101e6e
commit 63d940b339

View file

@ -126,15 +126,15 @@ mod tests {
let result_elem = elem.clone(); let result_elem = elem.clone();
let result = BlocklistResult::try_from(result_elem).unwrap(); let result = BlocklistResult::try_from(result_elem).unwrap();
assert_eq!(result.items, vec!()); assert!(result.items.is_empty());
let elem: Element = "<block xmlns='urn:xmpp:blocking'/>".parse().unwrap(); let elem: Element = "<block xmlns='urn:xmpp:blocking'/>".parse().unwrap();
let block = Block::try_from(elem).unwrap(); let block = Block::try_from(elem).unwrap();
assert_eq!(block.items, vec!()); assert!(block.items.is_empty());
let elem: Element = "<unblock xmlns='urn:xmpp:blocking'/>".parse().unwrap(); let elem: Element = "<unblock xmlns='urn:xmpp:blocking'/>".parse().unwrap();
let unblock = Unblock::try_from(elem).unwrap(); let unblock = Unblock::try_from(elem).unwrap();
assert_eq!(unblock.items, vec!()); assert!(unblock.items.is_empty());
} }
#[test] #[test]