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

refactor: use thiserror instead of failure #457

Merged
merged 1 commit into from
Oct 31, 2021
Merged

refactor: use thiserror instead of failure #457

merged 1 commit into from
Oct 31, 2021

Conversation

kurnevsky
Copy link
Member

@kurnevsky kurnevsky commented Sep 26, 2021

Fixes #424

@coveralls
Copy link

Pull Request Test Coverage Report for Build 1274747141

  • 211 of 311 (67.85%) changed or added relevant lines in 20 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage increased (+0.3%) to 87.197%

Changes Missing Coverage Covered Lines Changed/Added Lines %
tox_core/src/dht/lan_discovery.rs 0 1 0.0%
tox_core/src/dht/codec.rs 4 6 66.67%
tox_core/src/dht/server_ext.rs 5 7 71.43%
tox_core/src/relay/server/server_ext.rs 0 4 0.0%
tox_core/src/friend_connection/mod.rs 7 12 58.33%
tox_core/src/relay/client/client.rs 38 45 84.44%
tox_core/src/onion/client/mod.rs 20 30 66.67%
tox_core/src/relay/client/connections.rs 11 22 50.0%
tox_core/src/udp.rs 0 12 0.0%
tox_core/src/net_crypto/mod.rs 42 64 65.63%
Files with Coverage Reduction New Missed Lines %
tox_core/src/net_crypto/mod.rs 1 90.3%
Totals Coverage Status
Change from base Build 1273276378: 0.3%
Covered Lines: 14336
Relevant Lines: 16441

💛 - Coveralls

else {
return Err(Error::new(ErrorKind::Other, e.compat()))
if let DecodeError::Io(e) = e {
return Err(e);
Copy link
Member

Choose a reason for hiding this comment

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

Continue?

Copy link
Member Author

Choose a reason for hiding this comment

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

I inverted the condition - we ignore only decoding errors, not IO.

@kurnevsky kurnevsky merged commit 1e600e2 into master Oct 31, 2021
@kurnevsky kurnevsky deleted the thiserror branch October 31, 2021 18:09
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.

Failure is deprecated
3 participants