mirror of
https://github.com/logos-messaging/go-multiaddr.git
synced 2026-01-03 21:43:06 +00:00
remove redundant case
This commit is contained in:
parent
9680498266
commit
ece734f18d
6
codec.go
6
codec.go
@ -155,12 +155,6 @@ func sizeForAddr(p Protocol, b []byte) (skip, size int, err error) {
|
|||||||
return 0, (p.Size / 8), nil
|
return 0, (p.Size / 8), nil
|
||||||
case p.Size == 0:
|
case p.Size == 0:
|
||||||
return 0, 0, nil
|
return 0, 0, nil
|
||||||
case p.Path:
|
|
||||||
size, n, err := ReadVarintCode(b)
|
|
||||||
if err != nil {
|
|
||||||
return 0, 0, err
|
|
||||||
}
|
|
||||||
return n, size, nil
|
|
||||||
default:
|
default:
|
||||||
size, n, err := ReadVarintCode(b)
|
size, n, err := ReadVarintCode(b)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user