Add #[must_use]

This commit is contained in:
Stephen Chung
2021-06-12 22:47:43 +08:00
parent 68ea8c27fd
commit 8ca24059b1
28 changed files with 489 additions and 55 deletions

View File

@@ -21,8 +21,10 @@ pub use rhai_codegen::{export_fn, register_exported_fn};
/// Use the `#[export_module]` and `#[export_fn]` procedural attributes instead.
pub trait PluginFunction {
/// Call the plugin function with the arguments provided.
#[must_use]
fn call(&self, context: NativeCallContext, args: &mut FnCallArgs) -> RhaiResult;
/// Is this plugin function a method?
#[must_use]
fn is_method_call(&self) -> bool;
}