mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-18 01:43:47 +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
|
|
@ -45,11 +45,8 @@ func NewResourceError(code int, s string) error {
|
|||
panic("no such error code!")
|
||||
}
|
||||
r := &ResourceError{
|
||||
err: s,
|
||||
}
|
||||
switch code {
|
||||
case ErrNotFound, ErrIO, ErrUnauthorized, ErrInvalidValue, ErrDataOverflow, ErrNothingToReturn, ErrInvalidSignature, ErrNotSynced:
|
||||
r.code = code
|
||||
err: s,
|
||||
code: code,
|
||||
}
|
||||
return r
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue