Improve proc macro hygiene
This commit is contained in:
@@ -1,9 +1,8 @@
|
||||
use rhai::module_resolvers::*;
|
||||
use rhai::plugin::*;
|
||||
use rhai::{EvalAltResult, Module, RegisterFn, FLOAT, INT};
|
||||
use rhai::{Engine, EvalAltResult, Module, RegisterFn, FLOAT, INT};
|
||||
|
||||
pub mod raw_fn {
|
||||
use rhai::export_fn;
|
||||
use rhai::plugin::*;
|
||||
use rhai::FLOAT;
|
||||
|
||||
#[export_fn]
|
||||
@@ -37,7 +36,7 @@ fn raw_fn_test() -> Result<(), Box<EvalAltResult>> {
|
||||
}
|
||||
|
||||
mod raw_fn_mut {
|
||||
use rhai::export_fn;
|
||||
use rhai::plugin::*;
|
||||
use rhai::FLOAT;
|
||||
|
||||
#[export_fn]
|
||||
@@ -69,7 +68,7 @@ fn raw_fn_mut_test() -> Result<(), Box<EvalAltResult>> {
|
||||
}
|
||||
|
||||
mod raw_fn_str {
|
||||
use rhai::export_fn;
|
||||
use rhai::plugin::*;
|
||||
|
||||
#[export_fn]
|
||||
pub fn write_out_str(message: &str) -> bool {
|
||||
@@ -100,7 +99,7 @@ fn raw_fn_str_test() -> Result<(), Box<EvalAltResult>> {
|
||||
}
|
||||
|
||||
mod mut_opaque_ref {
|
||||
use rhai::export_fn;
|
||||
use rhai::plugin::*;
|
||||
use rhai::INT;
|
||||
|
||||
#[derive(Clone)]
|
||||
|
@@ -1,9 +1,8 @@
|
||||
use rhai::module_resolvers::*;
|
||||
use rhai::plugin::*;
|
||||
use rhai::{EvalAltResult, RegisterFn, FLOAT, INT};
|
||||
use rhai::{Engine, EvalAltResult, RegisterFn, FLOAT, INT};
|
||||
|
||||
pub mod empty_module {
|
||||
use rhai::export_module;
|
||||
use rhai::plugin::*;
|
||||
|
||||
#[export_module]
|
||||
pub mod EmptyModule {}
|
||||
@@ -25,7 +24,7 @@ fn empty_module_test() -> Result<(), Box<EvalAltResult>> {
|
||||
}
|
||||
|
||||
pub mod one_fn_module {
|
||||
use rhai::export_module;
|
||||
use rhai::plugin::*;
|
||||
|
||||
#[export_module]
|
||||
pub mod advanced_math {
|
||||
@@ -56,7 +55,7 @@ fn one_fn_module_test() -> Result<(), Box<EvalAltResult>> {
|
||||
}
|
||||
|
||||
pub mod one_fn_and_const_module {
|
||||
use rhai::export_module;
|
||||
use rhai::plugin::*;
|
||||
|
||||
#[export_module]
|
||||
pub mod advanced_math {
|
||||
@@ -91,7 +90,7 @@ fn one_fn_and_const_module_test() -> Result<(), Box<EvalAltResult>> {
|
||||
}
|
||||
|
||||
pub mod raw_fn_str_module {
|
||||
use rhai::export_module;
|
||||
use rhai::plugin::*;
|
||||
|
||||
#[export_module]
|
||||
pub mod host_io {
|
||||
@@ -122,7 +121,7 @@ fn raw_fn_str_module_test() -> Result<(), Box<EvalAltResult>> {
|
||||
}
|
||||
|
||||
pub mod mut_opaque_ref_module {
|
||||
use rhai::export_module;
|
||||
use rhai::plugin::*;
|
||||
use rhai::INT;
|
||||
|
||||
#[derive(Clone)]
|
||||
|
Reference in New Issue
Block a user