We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8b9b727 commit f8b308cCopy full SHA for f8b308c
1 file changed
mlua_derive/src/userdata_impl.rs
@@ -71,8 +71,12 @@ fn classify_ref_type(ty: &Type) -> Option<Type> {
71
if ref_ty.mutability.is_none() {
72
let lookup_name: Option<String> = match &*ref_ty.elem {
73
Type::Path(path) => path.path.segments.last().map(|seg| seg.ident.to_string()),
74
- Type::Slice(slice) if let Type::Path(path) = &*slice.elem => {
75
- path.path.segments.last().map(|seg| format!("[{}]", seg.ident))
+ Type::Slice(slice) => {
+ if let Type::Path(path) = &*slice.elem {
76
+ path.path.segments.last().map(|seg| format!("[{}]", seg.ident))
77
+ } else {
78
+ None
79
+ }
80
}
81
_ => None,
82
};
0 commit comments