From 197fa65b8fc8f35270df9cef68442b6a9c380ae1 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Fri, 5 Sep 2025 02:07:56 +0900 Subject: 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 --- system/dbus/address.go | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'system/dbus') 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) { -- cgit v1.3.1