Skip to content

Conversation

@tkr-sh
Copy link
Contributor

@tkr-sh tkr-sh commented Jan 21, 2025

FromLua:

  • integer: check if u8, if yes convert to char else error
  • string: only if one char the only char, else error
  • else: error

IntoLua:
convert to a ::mlua::String of length 1


Why ?
I think its important to have support for char since it's in std


Note

char in rust is more a u32 than a u8 actually. So Im ok that this is modified from u8 to u32 if needed.

@khvzak khvzak merged commit 47bc372 into mlua-rs:main Jan 28, 2025
@khvzak
Copy link
Member

khvzak commented Jan 28, 2025

Thanks

khvzak pushed a commit that referenced this pull request May 4, 2025
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