diff options
| author | Ophestra <cat@gensokyo.uk> | 2025-09-05 02:07:56 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2025-09-05 02:07:56 +0900 |
| commit | 197fa65b8fc8f35270df9cef68442b6a9c380ae1 (patch) | |
| tree | 2fbb1612f5332017ff69e28d8a16745e51b58674 /system/dbus | |
| parent | e81a45e849e7a85f50da04041d0f7a28b0fcc3cc (diff) | |
system/dbus: remove redundant proxy pairs
This is left over from before dbus.Final. Remove them now as they serve no purpose.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'system/dbus')
| -rw-r--r-- | system/dbus/address.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/system/dbus/address.go b/system/dbus/address.go index bec49e62..edee7e20 100644 --- a/system/dbus/address.go +++ b/system/dbus/address.go @@ -13,6 +13,13 @@ type AddrEntry struct { Values [][2]string `json:"values"` } +// EqualAddrEntries returns whether two slices of [AddrEntry] are equal. +func EqualAddrEntries(entries, target []AddrEntry) bool { + return slices.EqualFunc(entries, target, func(a AddrEntry, b AddrEntry) bool { + return a.Method == b.Method && slices.Equal(a.Values, b.Values) + }) +} + // Parse parses D-Bus address according to // https://dbus.freedesktop.org/doc/dbus-specification.html#addresses func Parse(addr []byte) ([]AddrEntry, error) { |
