Deprecate RegisterFn and RegisterResultFn.

This commit is contained in:
Stephen Chung
2021-03-15 11:36:30 +08:00
parent 2f8a3c24c0
commit d0922adb5b
35 changed files with 235 additions and 206 deletions

View File

@@ -1,4 +1,4 @@
use rhai::{Engine, EvalAltResult, RegisterFn, INT};
use rhai::{Engine, EvalAltResult, INT};
#[derive(Debug, Clone)]
struct TestStruct {

View File

@@ -1,4 +1,4 @@
use rhai::{Engine, EvalAltResult, RegisterFn, INT};
use rhai::{Engine, EvalAltResult, INT};
#[derive(Debug, Clone)]
struct TestStruct {

View File

@@ -1,4 +1,4 @@
use rhai::{Engine, EvalAltResult, RegisterFn, INT};
use rhai::{Engine, EvalAltResult, INT};
fn add(x: INT, y: INT) -> INT {
x + y

View File

@@ -1,6 +1,6 @@
///! This example registers a variety of functions that operate on strings.
///! Remember to use `ImmutableString` or `&str` instead of `String` as parameters.
use rhai::{Engine, EvalAltResult, ImmutableString, RegisterFn, Scope, INT};
use rhai::{Engine, EvalAltResult, ImmutableString, Scope, INT};
use std::io::{stdin, stdout, Write};
/// Trim whitespace from a string. The original string argument is changed.

View File

@@ -1,4 +1,4 @@
use rhai::{Engine, RegisterFn, INT};
use rhai::{Engine, INT};
#[cfg(feature = "sync")]
use std::sync::Mutex;