Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add dump format for Duration #92

Merged
merged 8 commits into from
Jun 20, 2023
Merged

Add dump format for Duration #92

merged 8 commits into from
Jun 20, 2023

Conversation

stephencelis
Copy link
Member

Could tweak it a bit, but better than the default.

extension Character: CustomDumpRepresentable {
public var customDumpValue: Any {
String(self)
}
}

#if (swift(>=5.7) && (os(iOS) || os(tvOS) || os(watchOS))) || (os(macOS) && swift(>=5.7.1))
Copy link
Member Author

Choose a reason for hiding this comment

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

Starting with an easy conformance for Apple platforms. Could take a custom conformance for Linux/Wasm/Windows or wait for the new open source Foundation to close the gap.

func customDumpHelp<T, TargetStream>(
_ value: T,
to target: inout TargetStream,
func customDumpHelp<InnerT, InnerTargetStream>(
Copy link
Member Author

Choose a reason for hiding this comment

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

Unrelated Swift 6 error fix.

@stephencelis stephencelis merged commit 9bc7670 into main Jun 20, 2023
10 checks passed
@stephencelis stephencelis deleted the duration branch June 20, 2023 23:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants