mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-18 09:53:48 +00:00
swarm/storage: Remove redundant error code switch
This commit is contained in:
parent
c7a45a512c
commit
4a9076d0e4
1 changed files with 2 additions and 5 deletions
|
|
@ -46,10 +46,7 @@ func NewResourceError(code int, s string) error {
|
||||||
}
|
}
|
||||||
r := &ResourceError{
|
r := &ResourceError{
|
||||||
err: s,
|
err: s,
|
||||||
}
|
code: code,
|
||||||
switch code {
|
|
||||||
case ErrNotFound, ErrIO, ErrUnauthorized, ErrInvalidValue, ErrDataOverflow, ErrNothingToReturn, ErrInvalidSignature, ErrNotSynced:
|
|
||||||
r.code = code
|
|
||||||
}
|
}
|
||||||
return r
|
return r
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue