Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
Signed-off-by: okJiang <[email protected]>
  • Loading branch information
okJiang committed Jun 17, 2024
1 parent c1d422e commit eeb7aa8
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pkg/schedule/placement/rule.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,7 @@ func (r *Rule) String() string {

// Clone returns a copy of Rule.
func (r *Rule) Clone() *Rule {
var clone Rule
json.Unmarshal([]byte(r.String()), &clone)
clone := *r
clone.StartKey = append(r.StartKey[:0:0], r.StartKey...)
clone.EndKey = append(r.EndKey[:0:0], r.EndKey...)
return &clone
Expand Down

0 comments on commit eeb7aa8

Please sign in to comment.