Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Encode FilePath as a string or an array of code units #181

Closed

Commits on Jun 3, 2024

  1. Encode FilePath as a string or an array of code units

    This changes the `FilePath`'s `Codable` conformance to encode and decode
    `FilePath` as a string or an array of code units instead of using the
    default synthesized implementation that encodes the storage directly.
    
    Decoding data as internal storage is not user-friendly and allows to
    construct invalid `FilePath` instances (e.g. with non-null-terminated
    storage).
    
    So, the new implementation tries to decode the input as a string first
    and then as an array of code units. If the array is not null-terminated,
    the decoding fails.
    kateinoigakukun committed Jun 3, 2024
    Configuration menu
    Copy the full SHA
    24c2652 View commit details
    Browse the repository at this point in the history