diff --git a/editor-standalone/Cargo.toml b/editor-standalone/Cargo.toml index 68e747502..58417d6bc 100644 --- a/editor-standalone/Cargo.toml +++ b/editor-standalone/Cargo.toml @@ -4,7 +4,7 @@ version = "0.36.2" license = "MIT" authors = ["Dmitry Stepanov "] edition = "2021" -rust-version = "1.80" +rust-version = "1.86" description = "A standalone scene editor for Fyrox game engine" homepage = "https://github.com/FyroxEngine/Fyrox" keywords = ["fyrox", "editor", "rust"] diff --git a/editor/Cargo.toml b/editor/Cargo.toml index c0443caa3..331d7a358 100644 --- a/editor/Cargo.toml +++ b/editor/Cargo.toml @@ -4,7 +4,7 @@ license = "MIT" version = "0.36.2" authors = ["Dmitry Stepanov "] edition = "2021" -rust-version = "1.80" +rust-version = "1.86" description = "A scene editor for Fyrox game engine" homepage = "https://github.com/FyroxEngine/Fyrox" keywords = ["fyrox", "editor", "rust"] diff --git a/fyrox-animation/Cargo.toml b/fyrox-animation/Cargo.toml index d98497873..bb936af38 100644 --- a/fyrox-animation/Cargo.toml +++ b/fyrox-animation/Cargo.toml @@ -12,7 +12,7 @@ homepage = "https://fyrox.rs" documentation = "https://docs.rs/fyrox-animation" repository = "https://github.com/FyroxEngine/Fyrox" readme = "README.md" -rust-version = "1.80" +rust-version = "1.86" [dependencies] fyrox-core = { version = "0.36.2", path = "../fyrox-core" } diff --git a/fyrox-autotile/Cargo.toml b/fyrox-autotile/Cargo.toml index ef2666003..9a1caa6d2 100644 --- a/fyrox-autotile/Cargo.toml +++ b/fyrox-autotile/Cargo.toml @@ -4,7 +4,7 @@ license = "MIT" version = "0.36.0" authors = ["Dmitry Stepanov ", "Brendan Guild "] edition = "2021" -rust-version = "1.80" +rust-version = "1.86" description = "An autotiler for Fyrox game engine" homepage = "https://github.com/FyroxEngine/Fyrox" keywords = ["tilemap", "autotile", "wave function collapse"] diff --git a/fyrox-build-tools/Cargo.toml b/fyrox-build-tools/Cargo.toml index 9f0d22883..d9c87d1e8 100644 --- a/fyrox-build-tools/Cargo.toml +++ b/fyrox-build-tools/Cargo.toml @@ -10,7 +10,7 @@ include = ["/src/**/*", "/Cargo.toml", "/LICENSE", "/README.md"] homepage = "https://fyrox.rs" documentation = "https://docs.rs/fyrox-build-tools" repository = "https://github.com/FyroxEngine/Fyrox" -rust-version = "1.80" +rust-version = "1.86" [dependencies] fyrox-core = { path = "../fyrox-core", version = "0.36.2" } diff --git a/fyrox-core-derive/Cargo.toml b/fyrox-core-derive/Cargo.toml index 92b498d72..9120aa60b 100644 --- a/fyrox-core-derive/Cargo.toml +++ b/fyrox-core-derive/Cargo.toml @@ -8,7 +8,7 @@ description = "Proc-macro for the Visit trait" repository = "https://github.com/FyroxEngine/Fyrox" include = ["/src/**/*", "/Cargo.toml", "/README.md"] readme = "README.md" -rust-version = "1.80" +rust-version = "1.86" [lib] proc-macro = true diff --git a/fyrox-core/Cargo.toml b/fyrox-core/Cargo.toml index 68b4f1672..cea49b22a 100644 --- a/fyrox-core/Cargo.toml +++ b/fyrox-core/Cargo.toml @@ -12,7 +12,7 @@ homepage = "https://fyrox.rs" documentation = "https://docs.rs/fyrox-core" repository = "https://github.com/FyroxEngine/Fyrox" readme = "README.md" -rust-version = "1.80" +rust-version = "1.86" [dependencies] fyrox-core-derive = { path = "../fyrox-core-derive", version = "0.36.2" } diff --git a/fyrox-dylib/Cargo.toml b/fyrox-dylib/Cargo.toml index da329410c..b522a91c9 100644 --- a/fyrox-dylib/Cargo.toml +++ b/fyrox-dylib/Cargo.toml @@ -12,7 +12,7 @@ homepage = "https://fyrox.rs" documentation = "https://docs.rs/fyrox-dylib" repository = "https://github.com/FyroxEngine/Fyrox" readme = "README.md" -rust-version = "1.80" +rust-version = "1.86" [lib] crate-type = ["dylib"] diff --git a/fyrox-graph/Cargo.toml b/fyrox-graph/Cargo.toml index 9b2378c01..1492bda12 100644 --- a/fyrox-graph/Cargo.toml +++ b/fyrox-graph/Cargo.toml @@ -11,7 +11,7 @@ include = ["/src/**/*", "/Cargo.toml", "/LICENSE"] homepage = "https://fyrox.rs" documentation = "https://docs.rs/fyrox-graph" repository = "https://github.com/FyroxEngine/Fyrox" -rust-version = "1.80" +rust-version = "1.86" [dependencies] fyrox-core = { path = "../fyrox-core", version = "0.36.2" } diff --git a/fyrox-graphics/Cargo.toml b/fyrox-graphics/Cargo.toml index be013c090..c8f93aa50 100644 --- a/fyrox-graphics/Cargo.toml +++ b/fyrox-graphics/Cargo.toml @@ -10,7 +10,7 @@ include = ["/src/**/*", "/Cargo.toml", "/LICENSE", "/README.md"] homepage = "https://fyrox.rs" documentation = "https://docs.rs/fyrox-ui" repository = "https://github.com/FyroxEngine/Fyrox" -rust-version = "1.80" +rust-version = "1.86" [dependencies] fyrox-core = { path = "../fyrox-core", version = "0.36.2", features = ["serde"] } diff --git a/fyrox-impl/Cargo.toml b/fyrox-impl/Cargo.toml index 32751cbd6..077eb2073 100644 --- a/fyrox-impl/Cargo.toml +++ b/fyrox-impl/Cargo.toml @@ -12,7 +12,7 @@ homepage = "https://fyrox.rs" documentation = "https://docs.rs/fyrox" repository = "https://github.com/FyroxEngine/Fyrox" readme = "README.md" -rust-version = "1.80" +rust-version = "1.86" [dependencies] fyrox-core-derive = { path = "../fyrox-core-derive", version = "0.36.2" } diff --git a/fyrox-impl/src/material/mod.rs b/fyrox-impl/src/material/mod.rs index 396e5af61..b80899f7d 100644 --- a/fyrox-impl/src/material/mod.rs +++ b/fyrox-impl/src/material/mod.rs @@ -47,8 +47,8 @@ use crate::{ resource::texture::TextureResource, }; use fxhash::FxHashMap; -use fyrox_resource::ResourceDataAsAny; use lazy_static::lazy_static; +use std::any::Any; use std::{ error::Error, fmt::{Display, Formatter}, @@ -1241,7 +1241,7 @@ impl MaterialResourceExtension for MaterialResource { ResourceState::Ok { ref data, .. } => MaterialResource::new_ok( Uuid::new_v4(), kind, - ResourceDataAsAny::as_any(&**data) + (&**data as &dyn Any) .downcast_ref::() .unwrap() .clone(), diff --git a/fyrox-math/Cargo.toml b/fyrox-math/Cargo.toml index 9522f9aa4..19c5de331 100644 --- a/fyrox-math/Cargo.toml +++ b/fyrox-math/Cargo.toml @@ -11,7 +11,7 @@ include = ["/src/**/*", "/Cargo.toml", "/LICENSE"] homepage = "https://fyrox.rs" documentation = "https://docs.rs/fyrox-math" repository = "https://github.com/FyroxEngine/Fyrox" -rust-version = "1.80" +rust-version = "1.86" [dependencies] rectutils = "0.3.0" diff --git a/fyrox-resource/Cargo.toml b/fyrox-resource/Cargo.toml index 19bfc6c47..d32d2a8e2 100644 --- a/fyrox-resource/Cargo.toml +++ b/fyrox-resource/Cargo.toml @@ -11,7 +11,7 @@ include = ["/src/**/*", "/Cargo.toml", "/LICENSE"] homepage = "https://fyrox.rs" documentation = "https://docs.rs/fyrox-resource" repository = "https://github.com/FyroxEngine/Fyrox" -rust-version = "1.80" +rust-version = "1.86" [dependencies] fyrox-core = { path = "../fyrox-core", version = "0.36.2", features = ["serde"] } diff --git a/fyrox-resource/src/lib.rs b/fyrox-resource/src/lib.rs index 850a45626..9fc91d680 100644 --- a/fyrox-resource/src/lib.rs +++ b/fyrox-resource/src/lib.rs @@ -38,7 +38,8 @@ use crate::{ }; use fxhash::FxHashSet; pub use fyrox_core as core; -use fyrox_core::{combine_uuids, define_as_any_trait, log::Log}; +use fyrox_core::{combine_uuids, log::Log}; +use std::any::Any; use std::path::PathBuf; use std::{ error::Error, @@ -76,10 +77,8 @@ pub const SHADER_RESOURCE_UUID: Uuid = uuid!("f1346417-b726-492a-b80f-c02096c6c0 /// Type UUID of curve resource. It is defined here to load old versions of resources. pub const CURVE_RESOURCE_UUID: Uuid = uuid!("f28b949f-28a2-4b68-9089-59c234f58b6b"); -define_as_any_trait!(ResourceDataAsAny => ResourceData); - /// A trait for resource data. -pub trait ResourceData: ResourceDataAsAny + Debug + Visit + Send + Reflect { +pub trait ResourceData: Debug + Visit + Send + Reflect { /// Returns unique data type id. fn type_uuid(&self) -> Uuid; @@ -129,7 +128,7 @@ where pub fn data(&mut self) -> Option<&mut T> { if let ResourceState::Ok { ref mut data, .. } = self.guard.state { - ResourceDataAsAny::as_any_mut(&mut **data).downcast_mut::() + (&mut **data as &mut dyn Any).downcast_mut::() } else { None } @@ -137,7 +136,7 @@ where pub fn data_ref(&self) -> Option<&T> { if let ResourceState::Ok { ref data, .. } = self.guard.state { - ResourceDataAsAny::as_any(&**data).downcast_ref::() + (&**data as &dyn Any).downcast_ref::() } else { None } @@ -468,7 +467,7 @@ where #[inline] pub fn as_loaded_ref(&self) -> Option<&T> { match self.guard.state { - ResourceState::Ok { ref data, .. } => ResourceDataAsAny::as_any(&**data).downcast_ref(), + ResourceState::Ok { ref data, .. } => (&**data as &dyn Any).downcast_ref(), _ => None, } } @@ -476,9 +475,7 @@ where #[inline] pub fn as_loaded_mut(&mut self) -> Option<&mut T> { match self.guard.state { - ResourceState::Ok { ref mut data, .. } => { - ResourceDataAsAny::as_any_mut(&mut **data).downcast_mut() - } + ResourceState::Ok { ref mut data, .. } => (&mut **data as &mut dyn Any).downcast_mut(), _ => None, } } @@ -529,7 +526,7 @@ where self.guard.kind ) } - ResourceState::Ok { ref data, .. } => ResourceDataAsAny::as_any(&**data) + ResourceState::Ok { ref data, .. } => (&**data as &dyn Any) .downcast_ref() .expect("Type mismatch!"), } @@ -555,7 +552,7 @@ where header.kind ) } - ResourceState::Ok { ref mut data, .. } => ResourceDataAsAny::as_any_mut(&mut **data) + ResourceState::Ok { ref mut data, .. } => (&mut **data as &mut dyn Any) .downcast_mut() .expect("Type mismatch!"), } diff --git a/fyrox-scripts/Cargo.toml b/fyrox-scripts/Cargo.toml index a839c45e2..fa31e7b05 100644 --- a/fyrox-scripts/Cargo.toml +++ b/fyrox-scripts/Cargo.toml @@ -11,7 +11,7 @@ include = ["/src/**/*", "/Cargo.toml", "/LICENSE"] homepage = "https://fyrox.rs" documentation = "https://docs.rs/fyrox-scripts" repository = "https://github.com/FyroxEngine/Fyrox" -rust-version = "1.80" +rust-version = "1.86" [dependencies] fyrox = { version = "0.36.2", path = "../fyrox" } \ No newline at end of file diff --git a/fyrox-sound/Cargo.toml b/fyrox-sound/Cargo.toml index c7204dc57..c8869c58d 100644 --- a/fyrox-sound/Cargo.toml +++ b/fyrox-sound/Cargo.toml @@ -12,7 +12,7 @@ homepage = "https://fyrox.rs" documentation = "https://docs.rs/fyrox-sound" repository = "https://github.com/FyroxEngine/Fyrox" readme = "README.md" -rust-version = "1.80" +rust-version = "1.86" [dependencies] fyrox-core = { path = "../fyrox-core", version = "0.36.2" } diff --git a/fyrox-texture/Cargo.toml b/fyrox-texture/Cargo.toml index 1f36ff090..5587ed937 100644 --- a/fyrox-texture/Cargo.toml +++ b/fyrox-texture/Cargo.toml @@ -10,7 +10,7 @@ include = ["/src/**/*", "/Cargo.toml", "/LICENSE", "/README.md"] homepage = "https://fyrox.rs" documentation = "https://docs.rs/fyrox-texture" repository = "https://github.com/FyroxEngine/Fyrox" -rust-version = "1.80" +rust-version = "1.86" [dependencies] fyrox-core = { path = "../fyrox-core", version = "0.36.2" } diff --git a/fyrox-ui/Cargo.toml b/fyrox-ui/Cargo.toml index b1047c19c..92207f8a9 100644 --- a/fyrox-ui/Cargo.toml +++ b/fyrox-ui/Cargo.toml @@ -12,7 +12,7 @@ homepage = "https://fyrox.rs" documentation = "https://docs.rs/fyrox-ui" repository = "https://github.com/FyroxEngine/Fyrox" readme = "README.md" -rust-version = "1.80" +rust-version = "1.86" [dependencies] fyrox-core = { path = "../fyrox-core", version = "0.36.2", features = ["serde"] } diff --git a/fyrox/Cargo.toml b/fyrox/Cargo.toml index dbcb7e2a9..4c81592bd 100644 --- a/fyrox/Cargo.toml +++ b/fyrox/Cargo.toml @@ -12,7 +12,7 @@ homepage = "https://fyrox.rs" documentation = "https://docs.rs/fyrox" repository = "https://github.com/FyroxEngine/Fyrox" readme = "README.md" -rust-version = "1.80" +rust-version = "1.86" [features] default = ["fyrox-impl"] diff --git a/project-manager/Cargo.toml b/project-manager/Cargo.toml index 752061275..9380ceb01 100644 --- a/project-manager/Cargo.toml +++ b/project-manager/Cargo.toml @@ -10,7 +10,7 @@ categories = ["game-development"] include = ["/src/**/*", "/Cargo.toml", "/LICENSE", "/README.md", "/resources/**/*"] homepage = "https://fyrox.rs" repository = "https://github.com/FyroxEngine/Fyrox" -rust-version = "1.80" +rust-version = "1.86" [dependencies] fyrox = { version = "0.36.2", path = "../fyrox" } diff --git a/template-core/Cargo.toml b/template-core/Cargo.toml index 20906eded..f6e31a90c 100644 --- a/template-core/Cargo.toml +++ b/template-core/Cargo.toml @@ -11,7 +11,7 @@ include = ["/src/**/*", "/Cargo.toml", "/LICENSE", "/README.md", "engine.version homepage = "https://fyrox.rs" repository = "https://github.com/FyroxEngine/Fyrox" readme = "README.md" -rust-version = "1.80" +rust-version = "1.86" [dependencies] uuid = { version = "1", features = ["v4"] } diff --git a/template/Cargo.toml b/template/Cargo.toml index a84795f02..21cba7bcc 100644 --- a/template/Cargo.toml +++ b/template/Cargo.toml @@ -11,7 +11,7 @@ include = ["/src/**/*", "/Cargo.toml", "/LICENSE", "/README.md"] homepage = "https://fyrox.rs" repository = "https://github.com/FyroxEngine/Fyrox" readme = "README.md" -rust-version = "1.80" +rust-version = "1.86" [dependencies] fyrox-template-core = { version = "0.36.2", path = "../template-core" }