Skip to content

Commit

Permalink
xerrors: remove useless condition checking in Is
Browse files Browse the repository at this point in the history
Analogous change to golang.org/cl/176497

Change-Id: I9296af11c53f1573f550f88ec14b55ed6ded3128
Reviewed-on: https://go-review.googlesource.com/c/xerrors/+/176517
Reviewed-by: Andrew Bonventre <[email protected]>
  • Loading branch information
cuonglm authored and andybons committed May 13, 2019
1 parent 5403a72 commit 3ee3066
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion wrap.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ func Is(err, target error) bool {
return err == target
}

isComparable := target == nil || reflect.TypeOf(target).Comparable()
isComparable := reflect.TypeOf(target).Comparable()
for {
if isComparable && err == target {
return true
Expand Down

0 comments on commit 3ee3066

Please sign in to comment.