diff options
| author | Jokler <jokler.contact@gmail.com> | 2019-02-21 00:33:06 +0100 |
|---|---|---|
| committer | Jokler <jokler.contact@gmail.com> | 2019-02-21 00:33:06 +0100 |
| commit | 79146633203db377a6669ede5ff5bcb1b34d4d05 (patch) | |
| tree | 188e1361ddc50fd4645df1bb0b9e03182cd6faa9 /src | |
| parent | b7e96ba8f1adf4426780de060d053437662c2d66 (diff) | |
| download | frippy-79146633203db377a6669ede5ff5bcb1b34d4d05.tar.gz frippy-79146633203db377a6669ede5ff5bcb1b34d4d05.zip | |
Main: Fix doc test and warnings
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib.rs | 7 | ||||
| -rw-r--r-- | src/plugins/unicode.rs | 4 |
2 files changed, 5 insertions, 6 deletions
@@ -17,7 +17,7 @@ //! let mut bot = Bot::new("."); //! //! bot.add_plugin(plugins::help::Help::new()); -//! bot.add_plugin(plugins::emoji::Emoji::new()); +//! bot.add_plugin(plugins::unicode::Unicode::new()); //! //! bot.connect(&mut reactor, &config).unwrap(); //! reactor.run().unwrap(); @@ -50,11 +50,11 @@ extern crate chrono; extern crate circular_queue; extern crate humantime; extern crate irc; +extern crate rand; extern crate regex; extern crate reqwest; extern crate serde_json; extern crate time; -extern crate rand; pub mod error; pub mod plugin; @@ -326,7 +326,8 @@ impl<C: FrippyClient + 'static> ThreadedPlugins<C> { impl<C: FrippyClient> fmt::Display for ThreadedPlugins<C> { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - let plugin_names = self.plugins + let plugin_names = self + .plugins .iter() .map(|(_, p)| p.name().to_owned()) .collect::<Vec<String>>(); diff --git a/src/plugins/unicode.rs b/src/plugins/unicode.rs index 60f01d5..0736ac7 100644 --- a/src/plugins/unicode.rs +++ b/src/plugins/unicode.rs @@ -1,7 +1,6 @@ extern crate unicode_names; use std::marker::PhantomData; -use std::fmt; use irc::client::prelude::*; @@ -11,7 +10,6 @@ use FrippyClient; use error::ErrorKind as FrippyErrorKind; use error::FrippyError; use failure::Fail; -use failure::ResultExt; #[derive(PluginName, Default, Debug)] pub struct Unicode<C> { @@ -60,7 +58,7 @@ impl<C: FrippyClient> Unicode<C> { impl<C: FrippyClient> Plugin for Unicode<C> { type Client = C; - fn execute(&self, client: &Self::Client, message: &Message) -> ExecutionStatus { + fn execute(&self, _: &Self::Client, _: &Message) -> ExecutionStatus { ExecutionStatus::Done } |
