Skip to content

Avoid panics, allow more robust inputs and handle conversion errors#47

Merged
alerque merged 8 commits intomasterfrom
typst-errors
Nov 15, 2025
Merged

Avoid panics, allow more robust inputs and handle conversion errors#47
alerque merged 8 commits intomasterfrom
typst-errors

Conversation

@alerque
Copy link
Copy Markdown
Owner

@alerque alerque commented Nov 13, 2025

No description provided.

Comment thread src/lua.rs
Copy link
Copy Markdown
Owner Author

@alerque alerque left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hopefully I can cleanup the ergonomics here, some of this got messy.

BREAKING CHANGE: The infalliable conversion functions are now mostly
falliable. This allows them to be used more robustly when the inputs
might not be know (e.g. the language identifier string hasn't been
validated or input has invalid UTF-8 encoding). The catch is that it
makes most function return a `Result<String>` instead of `String`.
@alerque alerque force-pushed the typst-errors branch 3 times, most recently from 943ec67 to 048acda Compare November 15, 2025 12:45
@alerque alerque merged commit d5155e1 into master Nov 15, 2025
26 of 27 checks passed
@alerque alerque deleted the typst-errors branch November 15, 2025 20:49
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.

2 participants