Skip to content

Commit

Permalink
Rename copy to clone
Browse files Browse the repository at this point in the history
  • Loading branch information
vmihailenco committed Mar 5, 2019
1 parent 4b1665d commit b665d8f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -703,12 +703,12 @@ func (c *ClusterClient) WithContext(ctx context.Context) *ClusterClient {
if ctx == nil {
panic("nil context")
}
c2 := c.copy()
c2 := c.clone()
c2.ctx = ctx
return c2
}

func (c *ClusterClient) copy() *ClusterClient {
func (c *ClusterClient) clone() *ClusterClient {
cp := *c
cp.init()
return &cp
Expand Down
4 changes: 2 additions & 2 deletions ring.go
Original file line number Diff line number Diff line change
Expand Up @@ -381,12 +381,12 @@ func (c *Ring) WithContext(ctx context.Context) *Ring {
if ctx == nil {
panic("nil context")
}
c2 := c.copy()
c2 := c.clone()
c2.ctx = ctx
return c2
}

func (c *Ring) copy() *Ring {
func (c *Ring) clone() *Ring {
cp := *c
return &cp
}
Expand Down

0 comments on commit b665d8f

Please sign in to comment.