diff options
| author | Ophestra <cat@gensokyo.uk> | 2025-11-25 04:04:07 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2025-11-25 04:05:22 +0900 |
| commit | 8f4a3bcf9f3d2dc0d8363b2f66ba41f5bc9f7c6a (patch) | |
| tree | 003dd46060ad3c1de2a013074845181901b1827a /internal/pipewire/core.go | |
| parent | 827dc9e1ba600622fd93f12f0e96de67e4b1347b (diff) | |
internal/pipewire: use custom marshaler when available
This reduces special cases. This change also exposes unmarshalled message size on the wire.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/pipewire/core.go')
| -rw-r--r-- | internal/pipewire/core.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/internal/pipewire/core.go b/internal/pipewire/core.go index a833009f..9a408e2f 100644 --- a/internal/pipewire/core.go +++ b/internal/pipewire/core.go @@ -76,4 +76,7 @@ type CoreHello struct { func (c *CoreHello) MarshalBinary() ([]byte, error) { return MarshalAppend(make([]byte, 0, 24), c) } // UnmarshalBinary satisfies [encoding.BinaryUnmarshaler] via [Unmarshal]. -func (c *CoreHello) UnmarshalBinary(data []byte) error { return Unmarshal(data, c) } +func (c *CoreHello) UnmarshalBinary(data []byte) error { + _, err := Unmarshal(data, c) + return err +} |
