Allow exhaustive match on Value.

It was not possible because `ValueRef` variant in `Value::Other` was private.
Closes #502 and #503
This commit is contained in:
Alex Orlenko
2024-12-10 23:35:39 +00:00
parent 91e069a77e
commit cd4091f64d
3 changed files with 24 additions and 3 deletions
+1 -2
View File
@@ -67,8 +67,7 @@ pub enum Value {
/// `Error` is a special builtin userdata type. When received from Lua it is implicitly cloned.
Error(Box<Error>),
/// Any other value not known to mlua (eg. LuaJIT CData).
#[allow(private_interfaces)]
Other(ValueRef),
Other(#[doc(hidden)] ValueRef),
}
pub use self::Value::Nil;