@@ -151,16 +151,16 @@ impl ToProgramClauses for AssociatedTyValue {
151
151
} ;
152
152
153
153
let normalize_goal = DomainGoal :: Normalize ( Normalize {
154
- projection : projection . clone ( ) ,
154
+ projection,
155
155
ty : self . value . value . ty . clone ( ) ,
156
156
} ) ;
157
157
158
158
// Determine the normalization
159
159
let normalization = Binders {
160
- binders : all_binders. clone ( ) ,
160
+ binders : all_binders,
161
161
value : ProgramClauseImplication {
162
- consequence : normalize_goal. clone ( ) ,
163
- conditions : conditions ,
162
+ consequence : normalize_goal,
163
+ conditions,
164
164
} ,
165
165
}
166
166
. cast ( ) ;
@@ -577,7 +577,7 @@ impl ToProgramClauses for TraitDatum {
577
577
}
578
578
}
579
579
580
- let condition = DomainGoal :: FromEnv ( FromEnv :: Trait ( trait_ref. clone ( ) ) ) ;
580
+ let condition = DomainGoal :: FromEnv ( FromEnv :: Trait ( trait_ref) ) ;
581
581
582
582
clauses. extend (
583
583
self . binders
@@ -730,7 +730,7 @@ impl ToProgramClauses for AssociatedTyDatum {
730
730
Binders {
731
731
binders : binders. clone ( ) ,
732
732
value : ProgramClauseImplication {
733
- consequence : projection_eq. clone ( ) . cast ( ) ,
733
+ consequence : projection_eq. cast ( ) ,
734
734
conditions : vec ! [ ] ,
735
735
} ,
736
736
}
@@ -838,10 +838,7 @@ impl ToProgramClauses for AssociatedTyDatum {
838
838
} ;
839
839
840
840
// `ProjectionEq(<T as Foo>::Assoc = U)`
841
- let projection_eq = ProjectionEq {
842
- projection : projection. clone ( ) ,
843
- ty,
844
- } ;
841
+ let projection_eq = ProjectionEq { projection, ty } ;
845
842
846
843
// Projection equality rule from above.
847
844
//
@@ -851,10 +848,10 @@ impl ToProgramClauses for AssociatedTyDatum {
851
848
// }
852
849
clauses. push (
853
850
Binders {
854
- binders : binders . clone ( ) ,
851
+ binders,
855
852
value : ProgramClauseImplication {
856
- consequence : projection_eq. clone ( ) . cast ( ) ,
857
- conditions : vec ! [ normalize. clone ( ) . cast( ) ] ,
853
+ consequence : projection_eq. cast ( ) ,
854
+ conditions : vec ! [ normalize. cast( ) ] ,
858
855
} ,
859
856
}
860
857
. cast ( ) ,
0 commit comments