Yet more packages into plugins.

This commit is contained in:
Stephen Chung
2020-08-15 00:04:10 +08:00
parent ceb1a26733
commit 209d1a174c
8 changed files with 425 additions and 316 deletions

View File

@@ -1,7 +1,6 @@
use rhai::plugin::*;
use rhai::{Engine, EvalAltResult, INT};
#[export_fn]
pub fn add_together(x: INT, y: INT) -> INT {
x + y

View File

@@ -1,7 +1,7 @@
#![cfg(not(any(feature = "no_index", feature = "no_module")))]
use rhai::plugin::*;
use rhai::{Engine, EvalAltResult, INT, Module};
use rhai::{Engine, EvalAltResult, Module, INT};
pub fn add_generic<T: std::ops::Add<Output = T>>(x: T, y: T) -> T {
x + y