-
Notifications
You must be signed in to change notification settings - Fork 124
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
refactor: rename ConnectionError to CloseReason #1872
Conversation
The `neqo_transport::ConnectionError` enum contains the two non-error variants `Error::NoError` and `CloseReason::Application(0)`. In other words, `ConnectionError` contains variants that are not errors. This commit renames `ConnectionError` to the more descriptive name `CloseReason`. See suggestion in mozilla#1866 (comment). To ease the upgrade for downstream users, this commit adds a deprecated `ConnectionError`, guiding users to rename to `CloseReason` via a deprecation warning. ``` rust pub type ConnectionError = CloseReason; ```
2db4096
to
c8c1d03
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two suggestions for your consideration (not sure if they make sense in the context of the rest of the code), otherwise LGTM.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1872 +/- ##
==========================================
- Coverage 93.24% 93.24% -0.01%
==========================================
Files 110 110
Lines 35812 35810 -2
==========================================
- Hits 33392 33390 -2
Misses 2420 2420 ☔ View full report in Codecov by Sentry. |
Benchmark resultsPerformance differences relative to 87bf852.
Client/server transfer resultsTransfer of 134217728 bytes over loopback.
|
The
neqo_transport::ConnectionError
enum contains the two non-error variantsError::NoError
andCloseReason::Application(0)
. In other words,ConnectionError
contains variants that are not errors.This commit renames
ConnectionError
to the more descriptive nameCloseReason
.See suggestion in #1866 (comment).
To ease the upgrade for downstream users, this commit adds a deprecated
ConnectionError
, guiding users to rename toCloseReason
via a deprecation warning.