chore: resolve clippy `incorrect_clone_impl_on_copy_type` (closes #1401) (#1418)

This commit is contained in:
Greg Johnston 2023-07-22 22:14:52 -04:00 committed by GitHub
parent 39bf38d1e4
commit ec4bfb0e8a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 11 additions and 58 deletions

View File

@ -1,4 +1,3 @@
#![allow(clippy::incorrect_clone_impl_on_copy_type)]
#![deny(missing_docs)]
#![forbid(unsafe_code)]
#![cfg_attr(feature = "nightly", feature(fn_traits))]

View File

@ -147,7 +147,7 @@ impl<T: ElementDescriptor + 'static> NodeRef<T> {
impl<T: ElementDescriptor> Clone for NodeRef<T> {
fn clone(&self) -> Self {
Self(self.0)
*self
}
}

View File

@ -1,4 +1,3 @@
#![allow(clippy::incorrect_clone_impl_on_copy_type)]
#![deny(missing_docs)]
#![cfg_attr(feature = "nightly", feature(fn_traits))]
#![cfg_attr(feature = "nightly", feature(unboxed_closures))]

View File

@ -179,13 +179,7 @@ where
T: 'static,
{
fn clone(&self) -> Self {
Self {
runtime: self.runtime,
id: self.id,
ty: PhantomData,
#[cfg(any(debug_assertions, feature = "ssr"))]
defined_at: self.defined_at,
}
*self
}
}

View File

@ -734,19 +734,8 @@ where
S: 'static,
T: 'static,
{
#[cfg_attr(
any(debug_assertions, feature = "ssr"),
instrument(level = "trace", skip_all,)
)]
fn clone(&self) -> Self {
Self {
runtime: self.runtime,
id: self.id,
source_ty: PhantomData,
out_ty: PhantomData,
#[cfg(any(debug_assertions, feature = "ssr"))]
defined_at: self.defined_at,
}
*self
}
}

View File

@ -71,11 +71,7 @@ where
impl<T> Clone for Signal<T> {
fn clone(&self) -> Self {
Self {
inner: self.inner,
#[cfg(any(debug_assertions, feature = "ssr"))]
defined_at: self.defined_at,
}
*self
}
}
@ -436,13 +432,7 @@ where
impl<T> Clone for SignalTypes<T> {
fn clone(&self) -> Self {
match self {
Self::ReadSignal(arg0) => Self::ReadSignal(*arg0),
Self::Memo(arg0) => Self::Memo(*arg0),
Self::DerivedSignal(arg0, arg1) => {
Self::DerivedSignal(*arg0, *arg1)
}
}
*self
}
}

View File

@ -63,11 +63,7 @@ where
impl<T> Clone for SignalSetter<T> {
fn clone(&self) -> Self {
Self {
inner: self.inner,
#[cfg(any(debug_assertions, feature = "ssr"))]
defined_at: self.defined_at,
}
*self
}
}
@ -231,11 +227,7 @@ where
impl<T> Clone for SignalSetterTypes<T> {
fn clone(&self) -> Self {
match self {
Self::Write(arg0) => Self::Write(*arg0),
Self::Mapped(cx, f) => Self::Mapped(*cx, *f),
Self::Default => Self::Default,
}
*self
}
}

View File

@ -33,11 +33,7 @@ where
impl<T> Clone for StoredValue<T> {
fn clone(&self) -> Self {
Self {
runtime: self.runtime,
id: self.id,
ty: self.ty,
}
*self
}
}

View File

@ -187,7 +187,7 @@ where
O: 'static,
{
fn clone(&self) -> Self {
Self(self.0)
*self
}
}

View File

@ -1,4 +1,3 @@
#![allow(clippy::incorrect_clone_impl_on_copy_type)]
#![deny(missing_docs)]
#![forbid(unsafe_code)]

View File

@ -77,7 +77,7 @@ where
O: 'static,
{
fn clone(&self) -> Self {
Self(self.0)
*self
}
}
@ -178,12 +178,7 @@ where
impl<I, O> Clone for Submission<I, O> {
fn clone(&self) -> Self {
Self {
input: self.input,
value: self.value,
pending: self.pending,
canceled: self.canceled,
}
*self
}
}