diff options
Diffstat (limited to 'internal/dbus')
| -rw-r--r-- | internal/dbus/address.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/dbus/address.go b/internal/dbus/address.go index edee7e20..4afea9e1 100644 --- a/internal/dbus/address.go +++ b/internal/dbus/address.go @@ -80,7 +80,7 @@ func unescapeValue(v []byte) (val []byte, errno ParseError) { continue } - if ib := bytes.IndexByte([]byte("-_/.\\*"), b); ib != -1 { // - // _/.\* + if found := bytes.Contains([]byte("-_/.\\*"), []byte{b}); found { // - // _/.\* goto opt } else if b >= '0' && b <= '9' { // 0-9 goto opt @@ -101,7 +101,7 @@ func unescapeValue(v []byte) (val []byte, errno ParseError) { break } if c, err := hex.Decode(val[i:i+1], v[iu+1:iu+3]); err != nil { - if errors.As(err, new(hex.InvalidByteError)) { + if _, ok := errors.AsType[hex.InvalidByteError](err); ok { errno = ErrBadValHexByte break } |
