Skip to content

Commit b31ce74

Browse files
committed
fix new clippy issues
1 parent 346874f commit b31ce74

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

bevy_script_api/src/lua/std.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,7 @@ impl<
461461
.collect::<Result<Vec<_>, _>>()
462462
}
463463
_ => {
464-
return Err(mlua::Error::FromLuaConversionError {
464+
Err(mlua::Error::FromLuaConversionError {
465465
from: new_val.type_name(),
466466
to: "userdata or table",
467467
message: Some("LuaVec can only be assigned with itself or a table".to_owned()),

examples/rhai/multiple_events_rhai.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,13 +113,13 @@ fn call_init(
113113
>,
114114
) {
115115
entity_query.for_each(|(entity, name, scripts)| {
116-
if let Some(_) = scripts {
116+
if scripts.is_some() {
117117
events.send(
118118
RhaiEvent {
119119
hook_name: "on_init".to_owned(),
120120
args: ScriptArgs {
121121
delta_time: None,
122-
entity_name: name.clone().map(|n| n.to_string()),
122+
entity_name: name.map(|n| n.to_string()),
123123
},
124124
recipients: Recipients::Entity(entity),
125125
},

0 commit comments

Comments
 (0)