From d6971a712f80be6dad6441b5610e84067d884ecd Mon Sep 17 00:00:00 2001 From: SoniEx2 Date: Sat, 29 Sep 2018 23:50:58 -0300 Subject: Tweak documentation to use the new PRI_* constants --- Cargo.toml | 2 +- src/lib.rs | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index afc5ddf..52c6904 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "hexchat-plugin" -version = "0.2.6" +version = "0.2.7" authors = ["SoniEx2 "] description = "Lets you write HexChat plugins in Rust" license = "AGPL-3.0+" diff --git a/src/lib.rs b/src/lib.rs index b89ead0..a9cd4df 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -46,7 +46,7 @@ //! ph.hook_command("hello-world", |ph, arg, arg_eol| { //! ph.print("Hello, World!"); //! hexchat_plugin::EAT_ALL -//! }, 0, Some("prints 'Hello, World!'")); +//! }, hexchat_plugin::PRI_NORM, Some("prints 'Hello, World!'")); //! true //! } //! } @@ -692,7 +692,7 @@ impl PluginHandle { /// ph.hook_command("hello-world", |ph, arg, arg_eol| { /// ph.print("Hello, World!"); /// hexchat_plugin::EAT_ALL - /// }, 0, Some("prints 'Hello, World!'")); + /// }, hexchat_plugin::PRI_NORM, Some("prints 'Hello, World!'")); /// } /// ``` pub fn hook_command(&mut self, cmd: &str, cb: F, pri: i32, help: Option<&str>) -> CommandHookHandle where F: Fn(&mut PluginHandle, Word, WordEol) -> Eat + 'static + ::std::panic::RefUnwindSafe { @@ -741,7 +741,7 @@ impl PluginHandle { /// ph.print("We have message tags!?"); /// } /// hexchat_plugin::EAT_NONE - /// }, 0); + /// }, hexchat_plugin::PRI_NORM); /// } /// ``` pub fn hook_server(&mut self, cmd: &str, cb: F, pri: i32) -> ServerHookHandle where F: Fn(&mut PluginHandle, Word, WordEol) -> Eat + 'static + ::std::panic::RefUnwindSafe { @@ -795,7 +795,7 @@ impl PluginHandle { /// } /// } /// hexchat_plugin::EAT_NONE - /// }, 0); + /// }, hexchat_plugin::PRI_NORM); /// } /// ``` pub fn hook_print(&mut self, name: &str, cb: F, pri: i32) -> PrintHookHandle where F: Fn(&mut PluginHandle, Word) -> Eat + 'static + ::std::panic::RefUnwindSafe { -- cgit 1.4.1