Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Merged by Bors] - bevy_reflect: Remove unnecessary Clone bounds #5783

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions crates/bevy_reflect/src/impls/smallvec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,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 @@ -41,7 +41,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 @@ -58,7 +58,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 @@ -116,7 +116,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 @@ -126,7 +126,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 All @@ -143,7 +143,7 @@ where

impl<T: smallvec::Array + Send + Sync + 'static> GetTypeRegistration for SmallVec<T>
where
T::Item: FromReflect + Clone,
T::Item: FromReflect,
{
fn get_type_registration() -> TypeRegistration {
let mut registration = TypeRegistration::of::<SmallVec<T>>();
Expand Down
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 @@ -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