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 --- src/lib.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/lib.rs') 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