Skip to content

Commit

Permalink
More clippy fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
MrGVSV committed Jun 1, 2022
1 parent 62339f1 commit 0910cba
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions crates/bevy_reflect/src/enums/enum_trait.rs
Original file line number Diff line number Diff line change
Expand Up @@ -323,8 +323,7 @@ impl<'a> VariantField<'a> {

pub fn value(&self) -> &'a dyn Reflect {
match self {
Self::Tuple(value) => *value,
Self::Struct(.., value) => *value,
Self::Struct(.., value) | Self::Tuple(value) => *value,
}
}
}
4 changes: 2 additions & 2 deletions crates/bevy_reflect/src/impls/std.rs
Original file line number Diff line number Diff line change
Expand Up @@ -874,10 +874,10 @@ mod tests {
.field_at_mut(0)
.and_then(|field| field.downcast_mut::<usize>())
{
*field = 321
*field = 321;
}
} else {
panic!("expected `VariantType::Tuple`")
panic!("expected `VariantType::Tuple`");
}

assert_eq!(Some(321), value);
Expand Down

0 comments on commit 0910cba

Please sign in to comment.