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

This commit is contained in:
Emmanuel Gil Peyrot 2020-12-10 20:44:54 +01:00
parent 63d940b339
commit 71b995731a

View file

@ -313,8 +313,8 @@ mod tests {
.parse() .parse()
.unwrap(); .unwrap();
let prefs = Prefs::try_from(elem).unwrap(); let prefs = Prefs::try_from(elem).unwrap();
assert_eq!(prefs.always, vec!()); assert!(prefs.always.is_empty());
assert_eq!(prefs.never, vec!()); assert!(prefs.never.is_empty());
let elem: Element = r#" let elem: Element = r#"
<prefs xmlns='urn:xmpp:mam:2' default='roster'> <prefs xmlns='urn:xmpp:mam:2' default='roster'>
@ -325,8 +325,8 @@ mod tests {
.parse() .parse()
.unwrap(); .unwrap();
let prefs = Prefs::try_from(elem).unwrap(); let prefs = Prefs::try_from(elem).unwrap();
assert_eq!(prefs.always, vec!()); assert!(prefs.always.is_empty());
assert_eq!(prefs.never, vec!()); assert!(prefs.never.is_empty());
} }
#[test] #[test]