Skip to content

Commit

Permalink
clippy happy
Browse files Browse the repository at this point in the history
  • Loading branch information
mockersf committed Aug 2, 2024
1 parent 61c683f commit c217238
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 2 additions & 0 deletions crates/bevy_asset/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1511,6 +1511,7 @@ mod tests {
Empty,
}

#[allow(dead_code)]
#[derive(Asset, TypePath)]
pub struct StructTestAsset {
#[dependency]
Expand All @@ -1519,6 +1520,7 @@ mod tests {
embedded: TestAsset,
}

#[allow(dead_code)]
#[derive(Asset, TypePath)]
pub struct TupleTestAsset(#[dependency] Handle<TestAsset>);
}
5 changes: 1 addition & 4 deletions crates/bevy_input/src/mouse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,14 @@

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},
system::ResMut,
};
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};
Expand Down
12 changes: 6 additions & 6 deletions tools/example-showcase/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(' ', "-")
Expand All @@ -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());
Expand Down Expand Up @@ -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 {
Expand All @@ -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();
Expand Down

0 comments on commit c217238

Please sign in to comment.