cargo fmt

Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
Maxime “pep” Buquet 2023-04-21 17:33:56 +02:00
parent 1e02dd2d1f
commit 1987b44315

View file

@ -35,7 +35,7 @@
//! # mode to ensure that it only matches a completely empty message stanza:
//!
//! Louise receives:
//! <message scansion:strict="true"/>
//! <message scansion:strict="true"/>
//! ```
use std::fmt::Debug;
@ -401,13 +401,13 @@ mod tests {
assert_eq!(scan1, &elem1);
let elem2: Element = "<presence scansion:strict='true' xmlns='jabber:client'>
<x xmlns='http://jabber.org/protocol/muc'/>
</presence>"
<x xmlns='http://jabber.org/protocol/muc'/>
</presence>"
.parse()
.unwrap();
let elem3: Element = "<presence xmlns='jabber:client'>
<x xmlns='http://jabber.org/protocol/muc'/>
</presence>"
<x xmlns='http://jabber.org/protocol/muc'/>
</presence>"
.parse()
.unwrap();
let scan2 = ScanElement::new(elem2);
@ -427,20 +427,20 @@ mod tests {
#[test]
fn compare_element_strict_nodes_success() {
let elem1: Element = "<presence scansion:strict='true' xmlns='jabber:client'>
<x xmlns='http://jabber.org/protocol/muc' />
<x xmlns='vcard-temp:x:update'>
<photo/>
</x>
</presence>"
<x xmlns='http://jabber.org/protocol/muc' />
<x xmlns='vcard-temp:x:update'>
<photo/>
</x>
</presence>"
.parse()
.unwrap();
// The same, minus 'scansion:strict'
let elem2: Element = "<presence xmlns='jabber:client'>
<x xmlns='http://jabber.org/protocol/muc' />
<x xmlns='vcard-temp:x:update'>
<photo/>
</x>
</presence>"
<x xmlns='http://jabber.org/protocol/muc' />
<x xmlns='vcard-temp:x:update'>
<photo/>
</x>
</presence>"
.parse()
.unwrap();
let scan1 = ScanElement::new(elem1);
@ -451,17 +451,17 @@ mod tests {
#[test]
fn compare_element_strict_nodes_failure() {
let elem1: Element = "<presence scansion:strict='true' xmlns='jabber:client'>
<x xmlns='http://jabber.org/protocol/muc' />
<x xmlns='vcard-temp:x:update'>
<photo/>
</x>
</presence>"
<x xmlns='http://jabber.org/protocol/muc' />
<x xmlns='vcard-temp:x:update'>
<photo/>
</x>
</presence>"
.parse()
.unwrap();
let elem2: Element = "<presence scansion:strict='true' xmlns='jabber:client'>
<x xmlns='http://jabber.org/protocol/muc' />
<x xmlns='vcard-temp:x:update'/>
</presence>"
<x xmlns='http://jabber.org/protocol/muc' />
<x xmlns='vcard-temp:x:update'/>
</presence>"
.parse()
.unwrap();
let scan1 = ScanElement::new(elem1);
@ -479,13 +479,13 @@ mod tests {
assert_eq!(scan1, &elem1);
let elem2: Element = "<presence xmlns='jabber:client'>
<x xmlns='http://jabber.org/protocol/muc' scansion:strict='false' />
</presence>"
<x xmlns='http://jabber.org/protocol/muc' scansion:strict='false' />
</presence>"
.parse()
.unwrap();
let elem3: Element = "<presence xmlns='jabber:client' foo='bar'>
<x xmlns='http://jabber.org/protocol/muc' baz='qxx' />
</presence>"
<x xmlns='http://jabber.org/protocol/muc' baz='qxx' />
</presence>"
.parse()
.unwrap();
let scan2 = ScanElement::new(elem2);
@ -504,13 +504,13 @@ mod tests {
assert_ne!(scan1, &elem2);
let elem2: Element = "<presence xmlns='jabber:client' foo='bar'>
<x xmlns='http://jabber.org/protocol/muc'/>
</presence>"
<x xmlns='http://jabber.org/protocol/muc'/>
</presence>"
.parse()
.unwrap();
let elem3: Element = "<presence xmlns='jabber:client'>
<x xmlns='http://jabber.org/protocol/muc'/>
</presence>"
<x xmlns='http://jabber.org/protocol/muc'/>
</presence>"
.parse()
.unwrap();
let scan2 = ScanElement::new(elem2);
@ -541,13 +541,13 @@ mod tests {
#[test]
fn compare_element_non_strict_elem_failure() {
let elem2: Element = "<message scansion:strict='false' xmlns='jabber:client'>
<body>foo</body>
</message>"
<body>foo</body>
</message>"
.parse()
.unwrap();
let elem3: Element = "<message xmlns='jabber:client'>
<body>bar</body>
</message>"
<body>bar</body>
</message>"
.parse()
.unwrap();
let scan2 = ScanElement::new(elem2);
@ -558,13 +558,13 @@ mod tests {
#[test]
fn compare_element_propagate_strictness() {
let elem1: Element = "<message scansion:strict='true' xmlns='jabber:client'>
<foo><bar /></foo>
</message>"
<foo><bar /></foo>
</message>"
.parse()
.unwrap();
let elem2: Element = "<message scansion:strict='true' xmlns='jabber:client'>
<foo><bar baz='qxx' /></foo>
</message>"
<foo><bar baz='qxx' /></foo>
</message>"
.parse()
.unwrap();
let scan1 = ScanElement::new(elem1);