File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed
Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -197,19 +197,16 @@ public extension Entity { // default imp
197197
198198 @inlinable
199199 subscript( attribute n: String ) -> Attribute ? {
200- for attr in attributes { if attr. name == n { return attr } }
201- return nil
200+ attributes. first ( where: { $0. name == n } )
202201 }
203202 @inlinable
204203 subscript( columnName n: String ) -> Attribute ? {
205- for attr in attributes { if attr. columnName == n { return attr } }
206- return nil
204+ attributes. first ( where: { $0. columnName == n } )
207205 }
208206
209207 @inlinable
210208 subscript( relationship n: String ) -> Relationship ? {
211- for rel in relationships { if rel. name == n { return rel } }
212- return nil
209+ relationships. first ( where: { $0. name == n } )
213210 }
214211
215212 @inlinable
You can’t perform that action at this time.
0 commit comments