Skip to content

Commit 5ba4cb4

Browse files
committed
further clean up
1 parent 705c10b commit 5ba4cb4

File tree

3 files changed

+10
-18
lines changed

3 files changed

+10
-18
lines changed

crates/bevy_mod_scripting_core/src/event.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ macro_rules! callback_labels {
5555

5656
$(
5757
pub struct $name;
58-
impl IntoCallbackLabel for $name {
59-
fn into_callback_label() -> CallbackLabel {
58+
impl $crate::event::IntoCallbackLabel for $name {
59+
fn into_callback_label() -> $crate::event::CallbackLabel {
6060
$label.into()
6161
}
6262
}

crates/languages/bevy_mod_scripting_lua/tests/lua_tests.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,10 @@ use bevy_mod_scripting_core::{
1616
use bevy_mod_scripting_functions::ScriptFunctionsPlugin;
1717
use bevy_mod_scripting_lua::{
1818
bindings::{reference::LuaReflectReference, world::GetWorld},
19-
lua_context_load, lua_handler,
20-
prelude::{Lua, LuaFunction},
21-
LuaScriptingPlugin,
19+
lua_context_load, lua_handler, LuaScriptingPlugin,
2220
};
2321
use libtest_mimic::{Arguments, Failed, Trial};
22+
use mlua::{Function, Lua};
2423
use std::{
2524
fs::{self, DirEntry},
2625
io, panic,
@@ -88,7 +87,7 @@ fn init_lua_test_utils(_script_name: &str, lua: &mut Lua) -> Result<(), ScriptEr
8887
.unwrap();
8988

9089
let assert_throws = lua
91-
.create_function(|lua, (f, regex): (LuaFunction, String)| {
90+
.create_function(|lua, (f, regex): (Function, String)| {
9291
let world = lua.get_world();
9392

9493
let result = f.call::<()>(());

examples/lua/game_of_life.rs

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
#![allow(deprecated)]
2-
use std::sync::{Arc, Mutex};
32

4-
use ansi_parser::AnsiParser;
5-
use asset::ScriptAsset;
63
use bevy::{
7-
diagnostic::{FrameTimeDiagnosticsPlugin, LogDiagnosticsPlugin},
84
image::ImageSampler,
95
log::LogPlugin,
106
prelude::*,
@@ -15,17 +11,14 @@ use bevy::{
1511
},
1612
window::{PrimaryWindow, WindowResized},
1713
};
18-
19-
use bevy_console::{
20-
make_layer, send_log_buffer_to_console, AddConsoleCommand, ConsoleCommand,
21-
ConsoleConfiguration, ConsoleOpen, ConsolePlugin, PrintConsoleLine,
14+
use bevy_console::{make_layer, AddConsoleCommand, ConsoleCommand, ConsoleOpen, ConsolePlugin};
15+
use bevy_mod_scripting::{NamespaceBuilder, ScriptFunctionsPlugin};
16+
use bevy_mod_scripting_core::{
17+
asset::ScriptAsset, bindings::script_value::ScriptValue, callback_labels,
18+
event::ScriptCallbackEvent, script::ScriptComponent, systems::event_handler,
2219
};
23-
use bevy_mod_scripting::{prelude::*, NamespaceBuilder, ScriptFunctionsPlugin};
2420
use bevy_mod_scripting_lua::LuaScriptingPlugin;
25-
use bindings::script_value::ScriptValue;
2621
use clap::Parser;
27-
use commands::DeleteScript;
28-
use script::ScriptComponent;
2922

3023
// CONSOLE SETUP
3124

0 commit comments

Comments
 (0)