From 207026ae5e35da096b8110afe1ba2973a0e54fdb Mon Sep 17 00:00:00 2001 From: SoniEx2 Date: Mon, 11 Apr 2022 19:33:04 -0300 Subject: [Project] hexchat-unsafe-plugin.rs A best-effort safe wrapper for the hexchat C API. Enables writing native hexchat plugins in mostly-safe Rust. --- src/word.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/word.rs') diff --git a/src/word.rs b/src/word.rs index 8bcabfc..9e484d7 100644 --- a/src/word.rs +++ b/src/word.rs @@ -1,5 +1,5 @@ // This file is part of Hexchat Plugin API Bindings for Rust -// Copyright (C) 2018, 2021 Soni L. +// Copyright (C) 2018, 2021, 2022 Soni L. // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as @@ -22,7 +22,7 @@ use std::ops::Deref; /// # Examples /// /// ```no_run -/// use hexchat_plugin::{PluginHandle, Word, WordEol, Eat}; +/// use hexchat_unsafe_plugin::{PluginHandle, Word, WordEol, Eat}; /// /// fn cmd_foo(ph: &mut PluginHandle, arg: Word, arg_eol: WordEol) -> Eat { /// if arg.len() < 3 { @@ -30,14 +30,14 @@ use std::ops::Deref; /// } else { /// ph.print(&format!("{} {} {}", arg[0], arg[1], arg[2])); /// } -/// hexchat_plugin::EAT_ALL +/// hexchat_unsafe_plugin::EAT_ALL /// } /// /// fn on_privmsg(ph: &mut PluginHandle, word: Word, word_eol: WordEol) -> Eat { /// if word.len() > 0 && word[0].starts_with('@') { /// ph.print("We have message tags!?"); /// } -/// hexchat_plugin::EAT_NONE +/// hexchat_unsafe_plugin::EAT_NONE /// } /// ``` pub struct Word<'a> { @@ -49,7 +49,7 @@ pub struct Word<'a> { /// # Examples /// /// ```no_run -/// use hexchat_plugin::{PluginHandle, Word, WordEol, Eat}; +/// use hexchat_unsafe_plugin::{PluginHandle, Word, WordEol, Eat}; /// /// fn cmd_foo(ph: &mut PluginHandle, arg: Word, arg_eol: WordEol) -> Eat { /// if arg.len() < 3 { @@ -57,14 +57,14 @@ pub struct Word<'a> { /// } else { /// ph.print(&format!("{} {} {}", arg[0], arg[1], arg_eol[2])); /// } -/// hexchat_plugin::EAT_ALL +/// hexchat_unsafe_plugin::EAT_ALL /// } /// /// fn on_privmsg(ph: &mut PluginHandle, word: Word, word_eol: WordEol) -> Eat { /// if word_eol.len() > 0 && word[0].starts_with('@') { /// ph.print("We have message tags!?"); /// } -/// hexchat_plugin::EAT_NONE +/// hexchat_unsafe_plugin::EAT_NONE /// } /// ``` pub struct WordEol<'a> { -- cgit 1.4.1