Janitor: Fix clippy::match_like_matches_macro

This commit is contained in:
Tobias Hunger 2021-07-22 14:49:56 +02:00 committed by Simon Hausmann
parent d543bc3a1d
commit 97be634b9b
2 changed files with 2 additions and 8 deletions

View file

@ -1077,10 +1077,7 @@ pub fn instantiate(
component_box.instance.as_ptr().cast(),
));
let is_state_info = match property_type {
Type::Struct { name: Some(name), .. } if name.ends_with("::StateInfo") => true,
_ => false,
};
let is_state_info = matches!(property_type, Type::Struct { name: Some(name), .. } if name.ends_with("::StateInfo"));
if is_state_info {
let prop = Pin::new_unchecked(
&*(instance_ref.as_ptr().add(*offset)