Skip to content

Commit 7924df0

Browse files
committed
clippy fixes
1 parent e6beb49 commit 7924df0

File tree

4 files changed

+16
-19
lines changed

4 files changed

+16
-19
lines changed

crates/bevy_mod_scripting_core/src/runtime.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
//! "Runtime" here refers to the execution evironment of scripts. This might be the VM executing bytecode or the interpreter executing source code.
22
//! The important thing is that there is only one runtime which is used to execute all scripts of a particular type or `context`.
33
4-
use bevy::ecs::system::Resource;
5-
64
use crate::IntoScriptPluginParams;
5+
use bevy::ecs::system::Resource;
76

87
pub trait Runtime: 'static {}
98
impl<T: 'static> Runtime for T {}
109

11-
pub type RuntimeInitializer<P: IntoScriptPluginParams> = fn(&mut P::R);
10+
pub type RuntimeInitializer<P> = fn(&mut <P as IntoScriptPluginParams>::R);
1211

1312
#[derive(Resource)]
1413
pub struct RuntimeSettings<P: IntoScriptPluginParams> {

crates/bevy_mod_scripting_core/src/script.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
//! Everything to do with the way scripts and their contexts are stored and handled.
22
3-
use std::{borrow::Cow, collections::HashMap, ops::Deref};
4-
5-
use bevy::{asset::Handle, ecs::system::Resource, reflect::Reflect};
6-
73
use crate::{asset::ScriptAsset, context::ContextId};
4+
use bevy::{asset::Handle, ecs::system::Resource, reflect::Reflect};
5+
use std::{borrow::Cow, collections::HashMap, ops::Deref};
86

97
pub type ScriptId = Cow<'static, str>;
108

crates/bevy_mod_scripting_core/src/world.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
use std::ops::Deref;
2-
use std::sync::Arc;
3-
41
use bevy::prelude::World;
52
use parking_lot::{
63
MappedRwLockReadGuard, MappedRwLockWriteGuard, RwLock, RwLockReadGuard, RwLockWriteGuard,
74
};
5+
use std::ops::Deref;
6+
use std::sync::Arc;
87

98
/// Pointer to a bevy world, safely allows multiple access via RwLock
109
///

crates/languages/bevy_mod_scripting_rune/src/lib.rs

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,16 @@ pub struct RuneScriptingPlugin {
2727

2828
impl Default for RuneScriptingPlugin {
2929
fn default() -> Self {
30-
Self {
31-
scripting_plugin: ScriptingPlugin {
32-
runtime_builder: todo!(),
33-
runtime_settings: todo!(),
34-
callback_handler: todo!(),
35-
context_builder: todo!(),
36-
context_assigner: todo!(),
37-
},
38-
}
30+
todo!()
31+
// Self {
32+
// scripting_plugin: ScriptingPlugin {
33+
// runtime_builder: todo!(),
34+
// runtime_settings: todo!(),
35+
// callback_handler: todo!(),
36+
// context_builder: todo!(),
37+
// context_assigner: todo!(),
38+
// },
39+
// }
3940
}
4041
}
4142

0 commit comments

Comments
 (0)