Skip to content

Commit

Permalink
revert Self -> ResourceObject change but also try swapping out a type…
Browse files Browse the repository at this point in the history
…alias reference that seems to be confusing to the compiler for the thing that typealias references.
  • Loading branch information
mattpolzin committed Mar 7, 2021
1 parent 87d43cc commit a8c4bf6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public extension JSONAPI.ResourceObject {
/// - parameters:
/// - replacement: A function that takes the existing `attributes` and returns the replacement.
func replacingAttributes(_ replacement: (Description.Attributes) -> Description.Attributes) -> Self {
return ResourceObject(id: id,
return Self(id: id,
attributes: replacement(attributes),
relationships: relationships,
meta: meta,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ public struct ResourceObject<Description: JSONAPI.ResourceObjectDescription, Met
/// the entity is being created clientside and the
/// server is being asked to create a unique Id. Otherwise,
/// this should be of a type conforming to `IdType`.
public let id: ResourceObject.Id
public let id: JSONAPI.Id<EntityRawIdType, Self>

/// The JSON API compliant attributes of this `ResourceObject`.
public let attributes: Description.Attributes
Expand Down

0 comments on commit a8c4bf6

Please sign in to comment.