Rustfmt pass, and rustfmt --check in CI"
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
parent
e1b53eae3c
commit
a104ebc3f6
79 changed files with 1344 additions and 957 deletions
|
|
@ -5,10 +5,10 @@
|
|||
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
use crate::util::error::Error;
|
||||
use crate::ns;
|
||||
use jid::FullJid;
|
||||
use crate::util::error::Error;
|
||||
use crate::Element;
|
||||
use jid::FullJid;
|
||||
use std::convert::TryFrom;
|
||||
|
||||
generate_attribute_enum!(
|
||||
|
|
@ -99,11 +99,9 @@ impl TryFrom<Element> for Actor {
|
|||
let nick = get_attr!(elem, "nick", Option);
|
||||
|
||||
match (jid, nick) {
|
||||
(Some(_), Some(_)) | (None, None) => {
|
||||
Err(Error::ParseError(
|
||||
"Either 'jid' or 'nick' attribute is required.",
|
||||
))
|
||||
}
|
||||
(Some(_), Some(_)) | (None, None) => Err(Error::ParseError(
|
||||
"Either 'jid' or 'nick' attribute is required.",
|
||||
)),
|
||||
(Some(jid), _) => Ok(Actor::Jid(jid)),
|
||||
(_, Some(nick)) => Ok(Actor::Nick(nick)),
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue