summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/plugin.rs2
-rw-r--r--src/plugins/keepnick.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/plugin.rs b/src/plugin.rs
index fb01168..d2338f9 100644
--- a/src/plugin.rs
+++ b/src/plugin.rs
@@ -10,7 +10,7 @@ pub trait Plugin: PluginName + Send + Sync + fmt::Debug {
fn is_allowed(&self, server: &IrcServer, message: &Message) -> bool;
/// Handles messages which are not commands but still necessary.
fn execute(&self, server: &IrcServer, message: &Message) -> Result<(), IrcError>;
- /// Handles any command directed at this plugina.
+ /// Handles any command directed at this plugin.
fn command(&self, server: &IrcServer, command: PluginCommand) -> Result<(), IrcError>;
}
diff --git a/src/plugins/keepnick.rs b/src/plugins/keepnick.rs
index 0d12110..1d4627d 100644
--- a/src/plugins/keepnick.rs
+++ b/src/plugins/keepnick.rs
@@ -44,7 +44,7 @@ impl Plugin for KeepNick {
fn execute(&self, server: &IrcServer, message: &Message) -> Result<(), IrcError> {
match message.command {
Command::QUIT(ref nick) => {
- self.check_nick(server, &nick.clone().unwrap_or(String::from("")))
+ self.check_nick(server, &nick.clone().unwrap_or_else(|| String::new()))
}
_ => Ok(()),
}