Remove unused functions
This commit is contained in:
parent
1ffe42d868
commit
a0b89b3990
3 changed files with 0 additions and 50 deletions
|
|
@ -73,19 +73,6 @@ macro_rules! packets {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
macro_rules! events {
|
|
||||||
( $( $name:ident, )* ) => {
|
|
||||||
impl Data {
|
|
||||||
pub fn is_event(&self) -> bool {
|
|
||||||
match self {
|
|
||||||
$( Self::$name(_) => true, )*
|
|
||||||
_ => false,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
macro_rules! commands {
|
macro_rules! commands {
|
||||||
( $( $cmd:ident => $rpl:ident, )* ) => {
|
( $( $cmd:ident => $rpl:ident, )* ) => {
|
||||||
$(
|
$(
|
||||||
|
|
@ -129,23 +116,6 @@ packets! {
|
||||||
WhoReply,
|
WhoReply,
|
||||||
}
|
}
|
||||||
|
|
||||||
events! {
|
|
||||||
BounceEvent,
|
|
||||||
DisconnectEvent,
|
|
||||||
HelloEvent,
|
|
||||||
JoinEvent,
|
|
||||||
LoginEvent,
|
|
||||||
LogoutEvent,
|
|
||||||
NetworkEvent,
|
|
||||||
NickEvent,
|
|
||||||
EditMessageEvent,
|
|
||||||
PartEvent,
|
|
||||||
PingEvent,
|
|
||||||
PmInitiateEvent,
|
|
||||||
SendEvent,
|
|
||||||
SnapshotEvent,
|
|
||||||
}
|
|
||||||
|
|
||||||
commands! {
|
commands! {
|
||||||
Auth => AuthReply,
|
Auth => AuthReply,
|
||||||
Ping => PingReply,
|
Ping => PingReply,
|
||||||
|
|
|
||||||
|
|
@ -62,10 +62,6 @@ impl<I: Eq + Hash, R> Replies<I, R> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn cancel(&mut self, id: &I) {
|
|
||||||
self.pending.remove(id);
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn purge(&mut self) {
|
pub fn purge(&mut self) {
|
||||||
self.pending.retain(|_, tx| !tx.is_closed());
|
self.pending.retain(|_, tx| !tx.is_closed());
|
||||||
}
|
}
|
||||||
|
|
|
||||||
16
src/store.rs
16
src/store.rs
|
|
@ -22,10 +22,6 @@ impl<I> Path<I> {
|
||||||
Self(segments)
|
Self(segments)
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn segments(&self) -> &[I] {
|
|
||||||
&self.0
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn push(&mut self, segment: I) {
|
pub fn push(&mut self, segment: I) {
|
||||||
self.0.push(segment)
|
self.0.push(segment)
|
||||||
}
|
}
|
||||||
|
|
@ -33,18 +29,6 @@ impl<I> Path<I> {
|
||||||
pub fn first(&self) -> &I {
|
pub fn first(&self) -> &I {
|
||||||
self.0.first().expect("path is not empty")
|
self.0.first().expect("path is not empty")
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn first_mut(&mut self) -> &mut I {
|
|
||||||
self.0.first_mut().expect("path is not empty")
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn last(&self) -> &I {
|
|
||||||
self.0.last().expect("path is not empty")
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn last_mut(&mut self) -> &mut I {
|
|
||||||
self.0.last_mut().expect("path is not empty")
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<I> IntoIterator for Path<I> {
|
impl<I> IntoIterator for Path<I> {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue