clippy: Enable non_canonical_clone_impl
rule
This commit is contained in:
parent
7669619f9a
commit
2601d19bac
@ -172,7 +172,6 @@ borrowed_box = "allow"
|
||||
derived_hash_with_manual_eq = "allow"
|
||||
forget_non_drop = "allow"
|
||||
needless_doctest_main = "allow"
|
||||
non_canonical_clone_impl = "allow"
|
||||
non_canonical_partial_ord_impl = "allow"
|
||||
too_many_arguments = "allow"
|
||||
type_complexity = "allow"
|
||||
|
@ -372,7 +372,7 @@ pub fn index(&self) -> Idx<N> {
|
||||
|
||||
impl<N> Clone for FileItemTreeId<N> {
|
||||
fn clone(&self) -> Self {
|
||||
Self(self.0)
|
||||
*self
|
||||
}
|
||||
}
|
||||
impl<N> Copy for FileItemTreeId<N> {}
|
||||
|
@ -219,7 +219,7 @@ pub struct ItemLoc<N: ItemTreeModItemNode> {
|
||||
|
||||
impl<N: ItemTreeModItemNode> Clone for ItemLoc<N> {
|
||||
fn clone(&self) -> Self {
|
||||
Self { container: self.container, id: self.id }
|
||||
*self
|
||||
}
|
||||
}
|
||||
|
||||
@ -248,7 +248,7 @@ pub struct AssocItemLoc<N: ItemTreeModItemNode> {
|
||||
|
||||
impl<N: ItemTreeModItemNode> Clone for AssocItemLoc<N> {
|
||||
fn clone(&self) -> Self {
|
||||
Self { container: self.container, id: self.id }
|
||||
*self
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -36,7 +36,7 @@ fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
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
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user