From 1d0143386de410b19a0e4adea497f7e246e89226 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Wed, 26 Nov 2025 18:50:09 +0900 Subject: internal/pipewire: optional final trailing garbage check Omitting the check is only useful for custom unmarshaler. Signed-off-by: Ophestra --- internal/pipewire/client.go | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'internal/pipewire/client.go') diff --git a/internal/pipewire/client.go b/internal/pipewire/client.go index ce2b6272..0dce269b 100644 --- a/internal/pipewire/client.go +++ b/internal/pipewire/client.go @@ -50,10 +50,7 @@ type ClientInfo struct { func (c *ClientInfo) MarshalBinary() ([]byte, error) { return Marshal(c) } // UnmarshalBinary satisfies [encoding.BinaryUnmarshaler] via [Unmarshal]. -func (c *ClientInfo) UnmarshalBinary(data []byte) error { - _, err := Unmarshal(data, c) - return err -} +func (c *ClientInfo) UnmarshalBinary(data []byte) error { return Unmarshal(data, c) } // ClientUpdateProperties is used to update the properties of a client. type ClientUpdateProperties struct { @@ -65,7 +62,4 @@ type ClientUpdateProperties struct { func (c *ClientUpdateProperties) MarshalBinary() ([]byte, error) { return Marshal(c) } // UnmarshalBinary satisfies [encoding.BinaryUnmarshaler] via [Unmarshal]. -func (c *ClientUpdateProperties) UnmarshalBinary(data []byte) error { - _, err := Unmarshal(data, c) - return err -} +func (c *ClientUpdateProperties) UnmarshalBinary(data []byte) error { return Unmarshal(data, c) } -- cgit v1.3.1