From 1ebf3c02d9c5bd967c1d45e6db343903bbdef777 Mon Sep 17 00:00:00 2001 From: Till Hoeppner Date: Tue, 21 Apr 2015 10:55:42 +0200 Subject: Remove to_name, etc. --- src/command.rs | 53 ----------------------------------------------------- 1 file changed, 53 deletions(-) (limited to 'src') diff --git a/src/command.rs b/src/command.rs index 707196b..8aab8b5 100644 --- a/src/command.rs +++ b/src/command.rs @@ -1573,59 +1573,6 @@ pub enum Command<'a> { USERHOST(Vec<&'a str>), } -impl<'a> Command<'a> { - pub fn to_name(&self) -> &'static str { - use self::Command::*; - match self { - &PASS => "PASS", - &NICK => "NICK", - &USER => "USER", - &OPER => "OPER", - &MODE => "MODE", - &SERVICE => "SERVICE", - &QUIT => "QUIT", - &SQUIT => "SQUIT", - &JOIN => "JOIN", - &PART => "PART", - &TOPIC => "TOPIC", - &NAMES => "NAMES", - &LIST => "LIST", - &INVITE => "INVITE", - &KICK => "KICK", - &PRIVMSG => "PRIVMSG", - &NOTICE => "NOTICE", - &MOTD => "MOTD", - &LUSERS => "LUSERS", - &VERSION => "VERSION", - &STATS => "STATS", - &LINKS => "LINKS", - &TIME => "TIME", - &CONNECT => "CONNECT", - &TRACE => "TRACE", - &ADMIN => "ADMIN", - &INFO => "INFO", - &SERVLIST => "SERVLIST", - &SQUERY => "SQUERY", - &WHO => "WHO", - &WHOIS => "WHOIS", - &WHOWAS => "WHOWAS", - &KILL => "KILL", - &PING(_, _) => "PING", - &PONG(_, _) => "PONG", - &ERROR(_) => "ERROR", - &AWAY(_) => "AWAY", - &REHASH => "REHASH", - &DIE => "DIE", - &RESTART => "RESTART", - &SUMMON(_, _) => "SUMMON", - &USERS(_) => "USERS", - &WALLOPS(_) => "WALLOPS", - &USERHOST(_) => "USERHOST", - &ISON => "ISON", - } - } -} - impl<'a> Command<'a> { pub fn from_message(msg: &'a Message) -> Option> { match msg.command() { -- cgit v1.2.3