clippy happy

This commit is contained in:
François 2024-08-02 19:55:29 +02:00
parent 61c683fb6a
commit c217238c5e
No known key found for this signature in database
4 changed files with 10 additions and 10 deletions

View file

@ -38,6 +38,7 @@ undocumented_unsafe_blocks = "warn"
redundant_else = "warn"
match_same_arms = "warn"
semicolon_if_nothing_returned = "warn"
doc_lazy_continuation = "allow"
ptr_as_ptr = "warn"
ptr_cast_constness = "warn"

View file

@ -1511,6 +1511,7 @@ mod tests {
Empty,
}
#[allow(dead_code)]
#[derive(Asset, TypePath)]
pub struct StructTestAsset {
#[dependency]
@ -1519,6 +1520,7 @@ mod tests {
embedded: TestAsset,
}
#[allow(dead_code)]
#[derive(Asset, TypePath)]
pub struct TupleTestAsset(#[dependency] Handle<TestAsset>);
}

View file

@ -2,9 +2,6 @@
use crate::{ButtonInput, ButtonState};
use bevy_ecs::entity::Entity;
#[cfg(feature = "bevy_reflect")]
use bevy_ecs::reflect::ReflectResource;
use bevy_ecs::system::Resource;
use bevy_ecs::{
change_detection::DetectChangesMut,
event::{Event, EventReader},
@ -12,7 +9,7 @@ use bevy_ecs::{
};
use bevy_math::Vec2;
#[cfg(feature = "bevy_reflect")]
use bevy_reflect::{std_traits::ReflectDefault, Reflect};
use bevy_reflect::Reflect;
#[cfg(all(feature = "serialize", feature = "bevy_reflect"))]
use bevy_reflect::{ReflectDeserialize, ReflectSerialize};

View file

@ -496,7 +496,7 @@ header_message = \"Examples (WebGL2)\"
// and other characters that don't
// work well in a URL path.
let category_path = root_path.join(
&to_show
to_show
.category
.replace(['(', ')'], "")
.replace(' ', "-")
@ -522,7 +522,7 @@ weight = {}
.unwrap();
categories.insert(to_show.category.clone(), 0);
}
let example_path = category_path.join(&to_show.technical_name.replace('_', "-"));
let example_path = category_path.join(to_show.technical_name.replace('_', "-"));
let _ = fs::create_dir_all(&example_path);
let code_path = example_path.join(Path::new(&to_show.path).file_name().unwrap());
@ -678,7 +678,7 @@ header_message = \"Examples ({})\"
let category_path = root_path.join(&to_build.category);
let _ = fs::create_dir_all(&category_path);
let example_path = category_path.join(&to_build.technical_name.replace('_', "-"));
let example_path = category_path.join(to_build.technical_name.replace('_', "-"));
let _ = fs::create_dir_all(&example_path);
if website_hacks {
@ -688,17 +688,17 @@ header_message = \"Examples ({})\"
let _ = fs::rename(
Path::new("examples/wasm/target/wasm_example.js"),
&example_path.join("wasm_example.js"),
example_path.join("wasm_example.js"),
);
if optimize_size {
let _ = fs::rename(
Path::new("examples/wasm/target/wasm_example_bg.wasm.optimized"),
&example_path.join("wasm_example_bg.wasm"),
example_path.join("wasm_example_bg.wasm"),
);
} else {
let _ = fs::rename(
Path::new("examples/wasm/target/wasm_example_bg.wasm"),
&example_path.join("wasm_example_bg.wasm"),
example_path.join("wasm_example_bg.wasm"),
);
}
pb.inc();