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

Change error type of Encodable to io::Error like bitcoin does #172

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

stevenroose
Copy link
Member

No description provided.

@stevenroose
Copy link
Member Author

stevenroose commented Aug 2, 2023

Really? Clippy in CI??

I disagree with clippy's suggestion in this case, though. I think

Ok(method_with_same_error_type()?)

is more expressive than leaving out the Ok and just forwarding. It also is more robust as it will probably not break if you change the signature of either the parent or child method. I think this is a dumb clippy suggestion, tbh.

Anyway, if you insist, I can go and fix the things.

@sanket1729
Copy link
Member

Feel free to ignore specific rules #[allow(clippy::rule)].

@sanket1729
Copy link
Member

Adding it in CI has served us well to spot some extra allocations, matching against wildcard etc. Overall, I am of the opinion that we should keep it in CI and ignore specific rules if we think are bothering us.

@apoelstra
Copy link
Member

I agree with clippy's suggestion but I really don't care, it's just a style rule. Feel free to ignore it to get CI to pass

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.

3 participants