| ... | @@ -175,13 +175,7 @@ pub fn Elem(comptime T: type) type { | ... | @@ -175,13 +175,7 @@ pub fn Elem(comptime T: type) type { |
| 175 | }, | 175 | }, |
| 176 | .Many, .C, .Slice => return info.child, | 176 | .Many, .C, .Slice => return info.child, |
| 177 | }, | 177 | }, |
| 178 | .Optional => |info| switch (@typeInfo(info.child)) { | 178 | .Optional => |info| return Elem(info.child), |
| 179 | .Pointer => |ptr_info| switch (ptr_info.size) { | | |
| 180 | .Many => return ptr_info.child, | | |
| 181 | else => {}, | | |
| 182 | }, | | |
| 183 | else => {}, | | |
| 184 | }, | | |
| 185 | else => {}, | 179 | else => {}, |
| 186 | } | 180 | } |
| 187 | @compileError("Expected pointer, slice, array or vector type, found '" ++ @typeName(T) ++ "'"); | 181 | @compileError("Expected pointer, slice, array or vector type, found '" ++ @typeName(T) ++ "'"); |