swarm/storage: Remove redundant error code switch

This commit is contained in:
lash 2018-02-05 19:28:40 +01:00
parent c7a45a512c
commit 4a9076d0e4

View file

@ -46,10 +46,7 @@ func NewResourceError(code int, s string) error {
}
r := &ResourceError{
err: s,
}
switch code {
case ErrNotFound, ErrIO, ErrUnauthorized, ErrInvalidValue, ErrDataOverflow, ErrNothingToReturn, ErrInvalidSignature, ErrNotSynced:
r.code = code
code: code,
}
return r
}