From aa5178e7736a6f8252e10e543e52722107649d3f Mon Sep 17 00:00:00 2001 From: Gino Valente Date: Thu, 26 May 2022 17:08:44 -0700 Subject: [PATCH] Fix clippy warnings --- crates/bevy_reflect/src/array.rs | 4 ++-- crates/bevy_reflect/src/fields.rs | 4 ++-- crates/bevy_reflect/src/list.rs | 4 ++-- crates/bevy_reflect/src/map.rs | 6 +++--- crates/bevy_reflect/src/struct_trait.rs | 2 +- crates/bevy_reflect/src/tuple.rs | 2 +- crates/bevy_reflect/src/tuple_struct.rs | 2 +- crates/bevy_reflect/src/type_info.rs | 4 ++-- 8 files changed, 14 insertions(+), 14 deletions(-) diff --git a/crates/bevy_reflect/src/array.rs b/crates/bevy_reflect/src/array.rs index 1193a99021eaf..aac72fb09cd41 100644 --- a/crates/bevy_reflect/src/array.rs +++ b/crates/bevy_reflect/src/array.rs @@ -70,7 +70,7 @@ impl ArrayInfo { /// /// [type name]: std::any::type_name pub fn type_name(&self) -> &'static str { - &self.type_name + self.type_name } /// The [`TypeId`] of the array. @@ -87,7 +87,7 @@ impl ArrayInfo { /// /// [type name]: std::any::type_name pub fn item_type_name(&self) -> &'static str { - &self.item_type_name + self.item_type_name } /// The [`TypeId`] of the array item. diff --git a/crates/bevy_reflect/src/fields.rs b/crates/bevy_reflect/src/fields.rs index 6100d36f0e642..21dc9ec5f75e2 100644 --- a/crates/bevy_reflect/src/fields.rs +++ b/crates/bevy_reflect/src/fields.rs @@ -29,7 +29,7 @@ impl NamedField { /// /// [type name]: std::any::type_name pub fn type_name(&self) -> &'static str { - &self.type_name + self.type_name } /// The [`TypeId`] of the field. @@ -69,7 +69,7 @@ impl UnnamedField { /// /// [type name]: std::any::type_name pub fn type_name(&self) -> &'static str { - &self.type_name + self.type_name } /// The [`TypeId`] of the field. diff --git a/crates/bevy_reflect/src/list.rs b/crates/bevy_reflect/src/list.rs index 0fe5087cdc2ec..2cba576f9a055 100644 --- a/crates/bevy_reflect/src/list.rs +++ b/crates/bevy_reflect/src/list.rs @@ -54,7 +54,7 @@ impl ListInfo { /// /// [type name]: std::any::type_name pub fn type_name(&self) -> &'static str { - &self.type_name + self.type_name } /// The [`TypeId`] of the list. @@ -71,7 +71,7 @@ impl ListInfo { /// /// [type name]: std::any::type_name pub fn item_type_name(&self) -> &'static str { - &self.item_type_name + self.item_type_name } /// The [`TypeId`] of the list item. diff --git a/crates/bevy_reflect/src/map.rs b/crates/bevy_reflect/src/map.rs index 8624b9c771e04..99a877cacab07 100644 --- a/crates/bevy_reflect/src/map.rs +++ b/crates/bevy_reflect/src/map.rs @@ -73,7 +73,7 @@ impl MapInfo { /// /// [type name]: std::any::type_name pub fn type_name(&self) -> &'static str { - &self.type_name + self.type_name } /// The [`TypeId`] of the map. @@ -90,7 +90,7 @@ impl MapInfo { /// /// [type name]: std::any::type_name pub fn key_type_name(&self) -> &'static str { - &self.key_type_name + self.key_type_name } /// The [`TypeId`] of the key. @@ -107,7 +107,7 @@ impl MapInfo { /// /// [type name]: std::any::type_name pub fn value_type_name(&self) -> &'static str { - &self.value_type_name + self.value_type_name } /// The [`TypeId`] of the value. diff --git a/crates/bevy_reflect/src/struct_trait.rs b/crates/bevy_reflect/src/struct_trait.rs index fb13ae5ef07dd..47b5676de3891 100644 --- a/crates/bevy_reflect/src/struct_trait.rs +++ b/crates/bevy_reflect/src/struct_trait.rs @@ -127,7 +127,7 @@ impl StructInfo { /// /// [type name]: std::any::type_name pub fn type_name(&self) -> &'static str { - &self.type_name + self.type_name } /// The [`TypeId`] of the struct. diff --git a/crates/bevy_reflect/src/tuple.rs b/crates/bevy_reflect/src/tuple.rs index f08d3330c863a..7529eda018a68 100644 --- a/crates/bevy_reflect/src/tuple.rs +++ b/crates/bevy_reflect/src/tuple.rs @@ -167,7 +167,7 @@ impl TupleInfo { /// /// [type name]: std::any::type_name pub fn type_name(&self) -> &'static str { - &self.type_name + self.type_name } /// The [`TypeId`] of the tuple. diff --git a/crates/bevy_reflect/src/tuple_struct.rs b/crates/bevy_reflect/src/tuple_struct.rs index 5da08f778689a..6a60c9f184e14 100644 --- a/crates/bevy_reflect/src/tuple_struct.rs +++ b/crates/bevy_reflect/src/tuple_struct.rs @@ -87,7 +87,7 @@ impl TupleStructInfo { /// /// [type name]: std::any::type_name pub fn type_name(&self) -> &'static str { - &self.type_name + self.type_name } /// The [`TypeId`] of the tuple struct. diff --git a/crates/bevy_reflect/src/type_info.rs b/crates/bevy_reflect/src/type_info.rs index dab00871a8cd4..70201b957c665 100644 --- a/crates/bevy_reflect/src/type_info.rs +++ b/crates/bevy_reflect/src/type_info.rs @@ -84,7 +84,7 @@ impl ValueInfo { /// /// [type name]: std::any::type_name pub fn type_name(&self) -> &'static str { - &self.type_name + self.type_name } /// The [`TypeId`] of the value. @@ -124,7 +124,7 @@ impl DynamicInfo { /// /// [type name]: std::any::type_name pub fn type_name(&self) -> &'static str { - &self.type_name + self.type_name } /// The [`TypeId`] of the dynamic value.