From 738a7168c032d3bb9c9f8d9bf9e51b2591bbbfc4 Mon Sep 17 00:00:00 2001 From: Dmitry Stepanov Date: Fri, 8 Aug 2025 23:21:29 +0300 Subject: [PATCH] removed useless warnings + removed dead code + updated deps --- editor/src/lib.rs | 1 + editor/src/plugins/tilemap/misc.rs | 79 ------------------------------ editor/src/plugins/tilemap/mod.rs | 1 - fyrox-animation/src/lib.rs | 1 + fyrox-core/Cargo.toml | 2 +- fyrox-core/src/lib.rs | 1 + fyrox-graphics/Cargo.toml | 2 +- fyrox-impl/Cargo.toml | 2 +- fyrox-impl/src/lib.rs | 1 + fyrox-math/Cargo.toml | 2 +- fyrox-sound/src/lib.rs | 1 + fyrox-ui/Cargo.toml | 2 +- fyrox-ui/src/lib.rs | 1 + 13 files changed, 11 insertions(+), 85 deletions(-) delete mode 100644 editor/src/plugins/tilemap/misc.rs diff --git a/editor/src/lib.rs b/editor/src/lib.rs index f88125531..e937f5cf0 100644 --- a/editor/src/lib.rs +++ b/editor/src/lib.rs @@ -26,6 +26,7 @@ #![allow(clippy::upper_case_acronyms)] #![allow(clippy::inconsistent_struct_constructor)] #![allow(clippy::mutable_key_type)] +#![allow(mismatched_lifetime_syntaxes)] #[macro_use] extern crate lazy_static; diff --git a/editor/src/plugins/tilemap/misc.rs b/editor/src/plugins/tilemap/misc.rs deleted file mode 100644 index 1690d4bf3..000000000 --- a/editor/src/plugins/tilemap/misc.rs +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) 2019-present Dmitry Stepanov and Fyrox Engine contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in all -// copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -// SOFTWARE. - -use crate::fyrox::{ - gui::{ - inspector::{ - editors::{ - PropertyEditorBuildContext, PropertyEditorDefinition, PropertyEditorInstance, - PropertyEditorMessageContext, PropertyEditorTranslationContext, - }, - InspectorError, PropertyChanged, - }, - message::{MessageDirection, UiMessage}, - text::{TextBuilder, TextMessage}, - widget::WidgetBuilder, - }, - scene::tilemap::Tiles, -}; -use std::any::TypeId; - -#[derive(Debug)] -pub struct TilesPropertyEditorDefinition; - -fn tiles_info(tiles: &Tiles) -> String { - format!("Tile Count: {}", tiles.len()) -} - -impl PropertyEditorDefinition for TilesPropertyEditorDefinition { - fn value_type_id(&self) -> TypeId { - TypeId::of::() - } - - fn create_instance( - &self, - ctx: PropertyEditorBuildContext, - ) -> Result { - let tiles = ctx.property_info.cast_value::()?; - - Ok(PropertyEditorInstance::Simple { - editor: TextBuilder::new(WidgetBuilder::new()) - .with_text(tiles_info(tiles)) - .build(ctx.build_context), - }) - } - - fn create_message( - &self, - ctx: PropertyEditorMessageContext, - ) -> Result, InspectorError> { - let tiles = ctx.property_info.cast_value::()?; - - Ok(Some(TextMessage::text( - ctx.instance, - MessageDirection::ToWidget, - tiles_info(tiles), - ))) - } - - fn translate_message(&self, _ctx: PropertyEditorTranslationContext) -> Option { - None - } -} diff --git a/editor/src/plugins/tilemap/mod.rs b/editor/src/plugins/tilemap/mod.rs index fc00f7c4a..5deb9eea5 100644 --- a/editor/src/plugins/tilemap/mod.rs +++ b/editor/src/plugins/tilemap/mod.rs @@ -33,7 +33,6 @@ mod handle_field; mod interaction_mode; mod macro_inspector; mod macro_tab; -mod misc; pub mod palette; pub mod panel; mod panel_preview; diff --git a/fyrox-animation/src/lib.rs b/fyrox-animation/src/lib.rs index cbeb75818..4cb472d14 100644 --- a/fyrox-animation/src/lib.rs +++ b/fyrox-animation/src/lib.rs @@ -23,6 +23,7 @@ #![warn(missing_docs)] #![allow(clippy::doc_lazy_continuation)] +#![allow(mismatched_lifetime_syntaxes)] use crate::{ core::{ diff --git a/fyrox-core/Cargo.toml b/fyrox-core/Cargo.toml index 7050e9ec0..9b1a63320 100644 --- a/fyrox-core/Cargo.toml +++ b/fyrox-core/Cargo.toml @@ -35,7 +35,7 @@ once_cell = "1.17.1" notify = "8" serde = { version = "1", features = ["derive"] } bincode = "1.3.3" -bytemuck = "1.16.1" +bytemuck = "1.23.2" strum = "0.26.1" strum_macros = "0.26.1" diff --git a/fyrox-core/src/lib.rs b/fyrox-core/src/lib.rs index 3eb62e0b7..630482c02 100644 --- a/fyrox-core/src/lib.rs +++ b/fyrox-core/src/lib.rs @@ -25,6 +25,7 @@ #![allow(clippy::upper_case_acronyms)] #![allow(clippy::from_over_into)] #![allow(clippy::doc_lazy_continuation)] +#![allow(mismatched_lifetime_syntaxes)] #[macro_use] extern crate memoffset; diff --git a/fyrox-graphics/Cargo.toml b/fyrox-graphics/Cargo.toml index 5d6d220dd..7178a94cf 100644 --- a/fyrox-graphics/Cargo.toml +++ b/fyrox-graphics/Cargo.toml @@ -17,4 +17,4 @@ fyrox-core = { path = "../fyrox-core", version = "1.0.0-rc.1", features = ["serd serde = { version = "1", features = ["derive"] } strum = "0.26.1" strum_macros = "0.26.1" -bytemuck = { version = "1.16.1", features = ["derive"] } \ No newline at end of file +bytemuck = { version = "1.23.2", features = ["derive"] } \ No newline at end of file diff --git a/fyrox-impl/Cargo.toml b/fyrox-impl/Cargo.toml index 7fd601646..47211e11b 100644 --- a/fyrox-impl/Cargo.toml +++ b/fyrox-impl/Cargo.toml @@ -48,7 +48,7 @@ uvgen = "0.2.0" lightmap = "0.2" libloading = "0.8.1" gltf = { version = "1.4.0", default-features = false, features = ["names", "utils", "extras"] } -bytemuck = { version = "1.16.1", features = ["derive"] } +bytemuck = { version = "1.23.2", features = ["derive"] } approx = "0.5.1" # These dependencies aren't used by the engine, but it is necessary to prevent cargo from rebuilding diff --git a/fyrox-impl/src/lib.rs b/fyrox-impl/src/lib.rs index 19b8d408d..061d57d73 100644 --- a/fyrox-impl/src/lib.rs +++ b/fyrox-impl/src/lib.rs @@ -32,6 +32,7 @@ #![allow(clippy::approx_constant)] #![allow(clippy::doc_lazy_continuation)] #![allow(clippy::mutable_key_type)] +#![allow(mismatched_lifetime_syntaxes)] pub mod engine; pub mod material; diff --git a/fyrox-math/Cargo.toml b/fyrox-math/Cargo.toml index 5cc7c7757..c4a0f78bb 100644 --- a/fyrox-math/Cargo.toml +++ b/fyrox-math/Cargo.toml @@ -19,4 +19,4 @@ nalgebra = { version = "0.33", features = ["bytemuck"] } arrayvec = "0.7.4" num-traits = "0.2.18" uuid = { version = "1", features = ["v4"] } -bytemuck = { version = "1.16.1", features = ["derive"] } +bytemuck = { version = "1.23.2", features = ["derive"] } diff --git a/fyrox-sound/src/lib.rs b/fyrox-sound/src/lib.rs index bc1dab724..4e0292074 100644 --- a/fyrox-sound/src/lib.rs +++ b/fyrox-sound/src/lib.rs @@ -86,6 +86,7 @@ //! They can be found [here](https://github.com/mrDIMAS/hrir_sphere_builder/tree/master/hrtf_base/IRCAM). #![warn(missing_docs)] +#![allow(mismatched_lifetime_syntaxes)] pub mod buffer; pub mod context; diff --git a/fyrox-ui/Cargo.toml b/fyrox-ui/Cargo.toml index fcfd6401f..82fc5f8b3 100644 --- a/fyrox-ui/Cargo.toml +++ b/fyrox-ui/Cargo.toml @@ -29,7 +29,7 @@ fxhash = "0.2.1" strum = "0.26.1" strum_macros = "0.26.1" serde = { version = "1", features = ["derive"] } -bytemuck = { version = "1.16.1", features = ["derive"] } +bytemuck = { version = "1.23.2", features = ["derive"] } uuid = { version = "1.7.0", features = ["v4"] } [features] diff --git a/fyrox-ui/src/lib.rs b/fyrox-ui/src/lib.rs index e64b7eb61..a6b83782f 100644 --- a/fyrox-ui/src/lib.rs +++ b/fyrox-ui/src/lib.rs @@ -200,6 +200,7 @@ #![allow(clippy::type_complexity)] #![allow(clippy::doc_lazy_continuation)] #![allow(clippy::mutable_key_type)] +#![allow(mismatched_lifetime_syntaxes)] pub use copypasta; pub use fyrox_core as core;