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: exact instances of some Option/Result/other combinators #466

Merged
merged 6 commits into from
Nov 21, 2022

Conversation

huitseeker
Copy link
Contributor

Tool-aided by comby-rust.

@dignifiedquire
Copy link
Contributor

Thanks for the PR, could you explain the reasoning behind this?

@huitseeker
Copy link
Contributor Author

huitseeker commented Nov 4, 2022

@dignifiedquire the intentional commit of this PR is the first, the other one being a standard run of clippy auto-fixes.

The idea is to simplify the code from verbose pattern-matches to idiomatic standard library combinators they are an exact reimplementation of. My opinions on this are loosely held - if you're not convinced of those idioms being simpler, in part or as a group, I'm happy to amend the PR to your desires, or close it altogether.

iroh-metrics/src/lib.rs Outdated Show resolved Hide resolved
iroh-p2p/src/node.rs Outdated Show resolved Hide resolved
stores/flatfs/src/flatfs.rs Outdated Show resolved Hide resolved
stores/flatfs/src/flatfs.rs Outdated Show resolved Hide resolved
stores/flatfs/src/flatfs.rs Outdated Show resolved Hide resolved
stores/flatfs/src/flatfs.rs Outdated Show resolved Hide resolved
@huitseeker
Copy link
Contributor Author

Thanks for the review @matthiasbeyer! This makes total sense, I'll also amend the tooling with your comments!

dignifiedquire
dignifiedquire previously approved these changes Nov 11, 2022
iroh-metrics/src/lib.rs Outdated Show resolved Hide resolved
@b5
Copy link
Member

b5 commented Nov 21, 2022

thanks @huitseeker!

@b5 b5 merged commit 78777c3 into n0-computer:main Nov 21, 2022
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.

4 participants