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

Equatable SocketAddressError #3119

Merged
merged 2 commits into from
Feb 23, 2025
Merged

Conversation

0xTim
Copy link
Contributor

@0xTim 0xTim commented Feb 23, 2025

Make SocketAddressError Equatable. This is useful when running tests that you expect to throw this error as it allows you to write for example

await #expect(throws: SocketAddressError.unknown(host: "127.0.0.1", port: Int.max)) {
    try await app.startup()
}

Copy link
Contributor

@Lukasa Lukasa left a comment

Choose a reason for hiding this comment

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

Let’s make it Hashable while we’re here.

Copy link
Contributor

@Lukasa Lukasa left a comment

Choose a reason for hiding this comment

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

Nice one, thanks Tim!

@Lukasa Lukasa added the 🆕 semver/minor Adds new public API. label Feb 23, 2025
@Lukasa Lukasa enabled auto-merge (squash) February 23, 2025 20:59
@Lukasa Lukasa merged commit 6c44e2d into apple:main Feb 23, 2025
34 of 36 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🆕 semver/minor Adds new public API.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants