tomaka / hlua

Rust library to interface with Lua
MIT License
507 stars 48 forks source link

Implement LuaPlainString for non-UTF-8 #141

Closed mkpankov closed 7 years ago

mkpankov commented 7 years ago

Fix #135

tomaka commented 7 years ago

As discussed in #135 I don't think Vec<u8> should represent a String.

You should create a newtype like pub struct LuaNonUtf8String(Vec<u8>); for example, and use it instead.

EDIT: LuaNonUtf8String would suggest that it can't contain an UTF8 String, so more LuaAnyString or something instead I guess.

tomaka commented 7 years ago

Thanks