Skip to content

Commit

Permalink
fix: slice append value (#2938)
Browse files Browse the repository at this point in the history
Signed-off-by: bytetigers <bytetiger@icloud.com>
  • Loading branch information
bytetigers authored and MarcoPolo committed Sep 4, 2024
1 parent d63b58c commit b1ec0f0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion p2p/net/swarm/dial_error.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ func (e *DialError) Unwrap() []error {
return nil
}

errs := make([]error, len(e.DialErrors)+1)
errs := make([]error, 0, len(e.DialErrors)+1)
if e.Cause != nil {
errs = append(errs, e.Cause)
}
Expand Down

0 comments on commit b1ec0f0

Please sign in to comment.