clippy: Enable non_canonical_clone_impl rule

This commit is contained in:
Tetsuharu Ohzeki 2024-02-09 22:37:42 +09:00
parent 7669619f9a
commit 2601d19bac
4 changed files with 4 additions and 5 deletions

View file

@ -36,7 +36,7 @@ impl<N: AstNode + std::fmt::Debug> std::fmt::Debug for AstPtr<N> {
impl<N: AstNode> Copy for AstPtr<N> {}
impl<N: AstNode> Clone for AstPtr<N> {
fn clone(&self) -> AstPtr<N> {
AstPtr { raw: self.raw, _ty: PhantomData }
*self
}
}