File tree Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Original file line number Diff line number Diff line change 76
76
import StructArrays
77
77
78
78
function StructArrays. staticschema (:: Type{P} ) where {N,P<: ParameterizedMeasure{N} }
79
- # Get the types from the NamedTuple parameter
80
79
par_type = fieldtype (P, :par )
81
- # Use proper type construction for the component types
82
80
types = Tuple{(fieldtype (par_type, n) for n in N). .. }
83
- # Return NamedTuple type with parameter names
84
- return NamedTuple{N,types}
81
+ NamedTuple{N,types}
85
82
end
86
83
87
84
function StructArrays. component (m:: ParameterizedMeasure , key:: Symbol )
88
- # Extract component from the parameters NamedTuple
89
- return getfield (getfield (m, :par ), key)
85
+ getfield (getfield (m, :par ), key)
90
86
end
91
87
92
88
function StructArrays. createinstance (:: Type{P} , args... ) where {N,P<: ParameterizedMeasure{N} }
93
- # Create a new ParameterizedMeasure instance from components
94
- return constructorof (P)(NamedTuple {N} (args))
89
+ constructorof (P)(NamedTuple {N} (args))
95
90
end
96
91
97
92
# ##############################################################################
You can’t perform that action at this time.
0 commit comments