Skip to content

Commit

Permalink
Clippy fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
adetaylor committed Feb 28, 2025
1 parent a4fe59e commit 9940ead
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/reference_wrapper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ impl<T: ?Sized> Receiver for CppRef<T> {

impl<T: ?Sized> Clone for CppRef<T> {
fn clone(&self) -> Self {
Self(self.0)
*self
}
}

Expand Down Expand Up @@ -176,10 +176,7 @@ impl<T: ?Sized> Deref for CppLtRef<'_, T> {

impl<T: ?Sized> Clone for CppLtRef<'_, T> {
fn clone(&self) -> Self {
Self {
ptr: self.ptr.clone(),
phantom: self.phantom,
}
*self
}
}

Expand Down Expand Up @@ -269,7 +266,7 @@ impl<T: ?Sized> Deref for CppMutRef<T> {

impl<T: ?Sized> Clone for CppMutRef<T> {
fn clone(&self) -> Self {
Self(self.0)
*self
}
}

Expand Down Expand Up @@ -549,7 +546,7 @@ impl<T: UniquePtrTarget> AsCppRef<T> for CppUniquePtrPin<T> {

impl<T: UniquePtrTarget> AsCppMutRef<T> for CppUniquePtrPin<T> {
fn as_cpp_mut_ref(&mut self) -> CppMutRef<T> {
self.1.clone()
self.1
}
}

Expand Down

0 comments on commit 9940ead

Please sign in to comment.