forked from quic-go/quic-go
fix incorrect usage of errors.Is
errors.Is is supposed to used for equality of errors, not for type assertions. That's what errors.As is there for.
This commit is contained in:
@@ -18,11 +18,6 @@ type headerParseError struct {
|
||||
err error
|
||||
}
|
||||
|
||||
func (e *headerParseError) Is(err error) bool {
|
||||
_, ok := err.(*headerParseError)
|
||||
return ok
|
||||
}
|
||||
|
||||
func (e *headerParseError) Unwrap() error {
|
||||
return e.err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user