Skip to content

Commit bdd6dd1

Browse files
committed
chore: use pre-encoded codec
1 parent f96df18 commit bdd6dd1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

codec.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ func stringToBytes(s string) ([]byte, error) {
3030
if p.Code == 0 {
3131
return nil, fmt.Errorf("failed to parse multiaddr %q: unknown protocol %s", s, sp[0])
3232
}
33-
_, _ = b.Write(CodeToVarint(p.Code))
33+
_, _ = b.Write(p.VCode)
3434
sp = sp[1:]
3535

3636
if p.Size == 0 { // no length.

0 commit comments

Comments
 (0)