diff options
author | SoniEx2 <endermoneymod@gmail.com> | 2018-11-03 20:20:53 -0300 |
---|---|---|
committer | SoniEx2 <endermoneymod@gmail.com> | 2018-11-03 20:20:53 -0300 |
commit | c9bc69de71199683d0f4809f1e45b6b2f8ac89ad (patch) | |
tree | 910985c0715f16e9f1ebb7e868213ae0f77ed1e7 | |
parent | 04a76896ffde1464cea23b14989b80aa9802a213 (diff) |
Add must_use
-rw-r--r-- | Cargo.toml | 2 | ||||
-rw-r--r-- | src/lib.rs | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/Cargo.toml b/Cargo.toml index a87a433..057703c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "hexchat-plugin" -version = "0.2.9" +version = "0.2.10" authors = ["SoniEx2 <endermoneymod@gmail.com>"] description = "Lets you write HexChat plugins in Rust" license = "AGPL-3.0+" diff --git a/src/lib.rs b/src/lib.rs index 0f74cf8..93ba6d6 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -314,6 +314,7 @@ pub struct Eat { } /// A command hook handle. +#[must_use = "Hooks must be stored somewhere and are automatically unhooked on Drop"] pub struct CommandHookHandle { ph: *mut internals::Ph, hh: *const internals::HexchatHook, @@ -322,6 +323,7 @@ pub struct CommandHookHandle { } /// A server hook handle. +#[must_use = "Hooks must be stored somewhere and are automatically unhooked on Drop"] pub struct ServerHookHandle { ph: *mut internals::Ph, hh: *const internals::HexchatHook, @@ -330,6 +332,7 @@ pub struct ServerHookHandle { } /// A print hook handle. +#[must_use = "Hooks must be stored somewhere and are automatically unhooked on Drop"] pub struct PrintHookHandle { ph: *mut internals::Ph, hh: *const internals::HexchatHook, @@ -338,6 +341,7 @@ pub struct PrintHookHandle { } /// A timer hook handle. +#[must_use = "Hooks must be stored somewhere and are automatically unhooked on Drop"] pub struct TimerHookHandle { ph: *mut internals::Ph, hh: *const internals::HexchatHook, |