Skip to content

Commit

Permalink
Remove unnecessary Clone bounds
Browse files Browse the repository at this point in the history
  • Loading branch information
MrGVSV committed Aug 24, 2022
1 parent 3d194a2 commit 9620c5f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions crates/bevy_reflect/src/impls/smallvec.rs
Expand Up @@ -8,7 +8,7 @@ use crate::{

impl<T: smallvec::Array + Send + Sync + 'static> Array for SmallVec<T>
where
T::Item: FromReflect + Clone,
T::Item: FromReflect,
{
fn get(&self, index: usize) -> Option<&dyn Reflect> {
if index < SmallVec::len(self) {
Expand Down Expand Up @@ -40,7 +40,7 @@ where

impl<T: smallvec::Array + Send + Sync + 'static> List for SmallVec<T>
where
T::Item: FromReflect + Clone,
T::Item: FromReflect,
{
fn push(&mut self, value: Box<dyn Reflect>) {
let value = value.take::<T::Item>().unwrap_or_else(|value| {
Expand All @@ -57,7 +57,7 @@ where

impl<T: smallvec::Array + Send + Sync + 'static> Reflect for SmallVec<T>
where
T::Item: FromReflect + Clone,
T::Item: FromReflect,
{
fn type_name(&self) -> &str {
std::any::type_name::<Self>()
Expand Down Expand Up @@ -115,7 +115,7 @@ where

impl<T: smallvec::Array + Send + Sync + 'static> Typed for SmallVec<T>
where
T::Item: FromReflect + Clone,
T::Item: FromReflect,
{
fn type_info() -> &'static TypeInfo {
static CELL: GenericTypeInfoCell = GenericTypeInfoCell::new();
Expand All @@ -125,7 +125,7 @@ where

impl<T: smallvec::Array + Send + Sync + 'static> FromReflect for SmallVec<T>
where
T::Item: FromReflect + Clone,
T::Item: FromReflect,
{
fn from_reflect(reflect: &dyn Reflect) -> Option<Self> {
if let ReflectRef::List(ref_list) = reflect.reflect_ref() {
Expand Down
4 changes: 2 additions & 2 deletions crates/bevy_reflect/src/impls/std.rs
Expand Up @@ -346,8 +346,8 @@ impl<K: FromReflect + Eq + Hash, V: FromReflect> Typed for HashMap<K, V> {

impl<K, V> GetTypeRegistration for HashMap<K, V>
where
K: FromReflect + Clone + Eq + Hash,
V: FromReflect + Clone,
K: FromReflect + Eq + Hash,
V: FromReflect,
{
fn get_type_registration() -> TypeRegistration {
let mut registration = TypeRegistration::of::<HashMap<K, V>>();
Expand Down

0 comments on commit 9620c5f

Please sign in to comment.