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

@@ -214,6 +214,7 @@ impl Engine {
/// 2) Functions registered into the global namespace
/// 3) Functions in static modules
/// 4) Functions in global modules (optional)
#[must_use]
pub fn gen_fn_metadata_with_ast_to_json(
&self,
ast: &AST,
@@ -253,6 +254,7 @@ impl Engine {
/// 1) Functions registered into the global namespace
/// 2) Functions in static modules
/// 3) Functions in global modules (optional)
#[must_use]
pub fn gen_fn_metadata_to_json(&self, include_global: bool) -> serde_json::Result<String> {
self.gen_fn_metadata_with_ast_to_json(&Default::default(), include_global)
}