internal/pipewire: optional final trailing garbage check

Omitting the check is only useful for custom unmarshaler.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2025-11-26 18:50:09 +09:00
parent a55c209099
commit 1d0143386d
3 changed files with 26 additions and 40 deletions

View File

@@ -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) }