fixed clippy warnings + project template

This commit is contained in:
Dmitry Stepanov
2024-05-16 11:07:01 +03:00
parent 19d1af059c
commit af4156a45c
3 changed files with 4 additions and 19 deletions
+1 -9
View File
@@ -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 {
+1 -8
View File
@@ -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 {
+2 -2
View File
@@ -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>,
}