delint (clippy)
This commit is contained in:
parent
00e2daaecd
commit
7cd31bd425
8 changed files with 55 additions and 64 deletions
|
|
@ -9,22 +9,22 @@ pub enum Event {
|
|||
|
||||
impl Event {
|
||||
pub fn is_online(&self) -> bool {
|
||||
match self {
|
||||
&Event::Online => true,
|
||||
match *self {
|
||||
Event::Online => true,
|
||||
_ => false,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn is_stanza(&self, name: &str) -> bool {
|
||||
match self {
|
||||
&Event::Stanza(ref stanza) => stanza.name() == name,
|
||||
match *self {
|
||||
Event::Stanza(ref stanza) => stanza.name() == name,
|
||||
_ => false,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn as_stanza(&self) -> Option<&Element> {
|
||||
match self {
|
||||
&Event::Stanza(ref stanza) => Some(stanza),
|
||||
match *self {
|
||||
Event::Stanza(ref stanza) => Some(stanza),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue