Add must_use
This commit is contained in:
parent
04a76896ff
commit
c9bc69de71
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "hexchat-plugin"
|
name = "hexchat-plugin"
|
||||||
version = "0.2.9"
|
version = "0.2.10"
|
||||||
authors = ["SoniEx2 <endermoneymod@gmail.com>"]
|
authors = ["SoniEx2 <endermoneymod@gmail.com>"]
|
||||||
description = "Lets you write HexChat plugins in Rust"
|
description = "Lets you write HexChat plugins in Rust"
|
||||||
license = "AGPL-3.0+"
|
license = "AGPL-3.0+"
|
||||||
|
|
|
@ -314,6 +314,7 @@ pub struct Eat {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// A command hook handle.
|
/// A command hook handle.
|
||||||
|
#[must_use = "Hooks must be stored somewhere and are automatically unhooked on Drop"]
|
||||||
pub struct CommandHookHandle {
|
pub struct CommandHookHandle {
|
||||||
ph: *mut internals::Ph,
|
ph: *mut internals::Ph,
|
||||||
hh: *const internals::HexchatHook,
|
hh: *const internals::HexchatHook,
|
||||||
|
@ -322,6 +323,7 @@ pub struct CommandHookHandle {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// A server hook handle.
|
/// A server hook handle.
|
||||||
|
#[must_use = "Hooks must be stored somewhere and are automatically unhooked on Drop"]
|
||||||
pub struct ServerHookHandle {
|
pub struct ServerHookHandle {
|
||||||
ph: *mut internals::Ph,
|
ph: *mut internals::Ph,
|
||||||
hh: *const internals::HexchatHook,
|
hh: *const internals::HexchatHook,
|
||||||
|
@ -330,6 +332,7 @@ pub struct ServerHookHandle {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// A print hook handle.
|
/// A print hook handle.
|
||||||
|
#[must_use = "Hooks must be stored somewhere and are automatically unhooked on Drop"]
|
||||||
pub struct PrintHookHandle {
|
pub struct PrintHookHandle {
|
||||||
ph: *mut internals::Ph,
|
ph: *mut internals::Ph,
|
||||||
hh: *const internals::HexchatHook,
|
hh: *const internals::HexchatHook,
|
||||||
|
@ -338,6 +341,7 @@ pub struct PrintHookHandle {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// A timer hook handle.
|
/// A timer hook handle.
|
||||||
|
#[must_use = "Hooks must be stored somewhere and are automatically unhooked on Drop"]
|
||||||
pub struct TimerHookHandle {
|
pub struct TimerHookHandle {
|
||||||
ph: *mut internals::Ph,
|
ph: *mut internals::Ph,
|
||||||
hh: *const internals::HexchatHook,
|
hh: *const internals::HexchatHook,
|
||||||
|
|
Loading…
Reference in New Issue