trivial refactor in sparse fieldset file

This commit is contained in:
Mathew Polzin
2019-11-07 08:08:45 -08:00
parent 7fabe2574e
commit 86344ef93f
@@ -36,15 +36,12 @@ public struct SparseFieldset<
public extension ResourceObject where Description.Attributes: SparsableAttributes {
/// The `SparseFieldset` type for this `ResourceObject`
typealias SparseType = SparseFieldset<Description, MetaType, LinksType, EntityRawIdType>
/// Get a Sparse Fieldset of this `ResourceObject` that can be encoded
/// as a `SparsePrimaryResource`.
func sparse(with fields: [Description.Attributes.CodingKeys]) -> SparseFieldset<Description, MetaType, LinksType, EntityRawIdType> {
func sparse(with fields: [Description.Attributes.CodingKeys]) -> SparseType {
return SparseFieldset(self, fields: fields)
}
}
public extension ResourceObject where Description.Attributes: SparsableAttributes {
/// The `SparseFieldset` type for this `ResourceObject`
typealias SparseType = SparseFieldset<Description, MetaType, LinksType, EntityRawIdType>
}