Skip to content

Conversation

@CramBL
Copy link

@CramBL CramBL commented Aug 26, 2025

The change achieves 2 things:

  • If GPSD somehow sends invalid UTF-8, we avoid crashing and instead replace invalid UTF-8 with the replacement character, which means we continue to JSON deserialization which will fail and return an error the user can handle.
  • For calls to trace! we avoid the extra allocation by not cloning the payload

…d an extra allocation on logging

The change achieves 2 things:

- If GPSD somehow sends invalid UTF-8, we avoid crashing and instead replace invalid UTF-8 with the replacement character, which means we continue to JSON deserialization which will fail and return an error the user can handle.
- For calls to trace! we avoid the extra allocation by not cloning the payload
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant