mirror of
https://github.com/FyroxEngine/Fyrox.git
synced 2026-10-12 02:02:20 +00:00
fixed clippy warnings + project template
This commit is contained in:
@@ -36,19 +36,11 @@ pub struct NodeConstructor {
|
||||
}
|
||||
|
||||
/// A special container that is able to create nodes by their type UUID.
|
||||
|
||||
#[derive(Default)]
|
||||
pub struct NodeConstructorContainer {
|
||||
map: Mutex<FxHashMap<Uuid, NodeConstructor>>,
|
||||
}
|
||||
|
||||
impl Default for NodeConstructorContainer {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
map: Default::default(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl NodeConstructorContainer {
|
||||
/// Creates default node constructor container with constructors for built-in engine nodes.
|
||||
pub fn new() -> Self {
|
||||
|
||||
@@ -27,19 +27,12 @@ pub struct ScriptConstructor {
|
||||
}
|
||||
|
||||
/// A special container that is able to create nodes by their type UUID.
|
||||
#[derive(Default)]
|
||||
pub struct ScriptConstructorContainer {
|
||||
// BTreeMap allows to have sorted list of constructors.
|
||||
map: Mutex<BTreeMap<Uuid, ScriptConstructor>>,
|
||||
}
|
||||
|
||||
impl Default for ScriptConstructorContainer {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
map: Default::default(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl ScriptConstructorContainer {
|
||||
/// Creates default node constructor container with constructors for built-in engine nodes.
|
||||
pub fn new() -> Self {
|
||||
|
||||
@@ -162,7 +162,7 @@ dylib-engine = ["fyrox/dylib"]
|
||||
base_path.join("game/src/lib.rs"),
|
||||
r#"//! Game project.
|
||||
use fyrox::{
|
||||
core::pool::Handle, core::visitor::prelude::*,
|
||||
core::pool::Handle, core::visitor::prelude::*, core::reflect::prelude::*,
|
||||
event::Event,
|
||||
gui::message::UiMessage,
|
||||
plugin::{Plugin, PluginContext, PluginRegistrationContext},
|
||||
@@ -173,7 +173,7 @@ use std::path::Path;
|
||||
// Re-export the engine.
|
||||
pub use fyrox;
|
||||
|
||||
#[derive(Default, Visit)]
|
||||
#[derive(Default, Visit, Reflect)]
|
||||
pub struct Game {
|
||||
scene: Handle<Scene>,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user