Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Sources/Get/DataLoader.swift
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ func encode(_ value: Encodable, using encoder: JSONEncoder) async throws -> Data
return string.data(using: .utf8)
} else {
return try await Task.detached {
try encoder.encode(AnyEncodable(value: value))
try encoder.encode(value)
Copy link
Owner

@kean kean Apr 25, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think AnyEncodable can now also be removed. It was probably a rudiment from one of the earlier implementations or was required by one of the earlier Swift versions – I can't remember now.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there might have been a time when AnyEncodable didn't support Optionals or something

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

want me to remove and update this PR? or you want to do it?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would appreciate if you could remove it, but I can do it myself later.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed it in main

}.value
}
}
Expand Down