Repository navigation
Conversation
From the review for maintainability. round, fetch_one and run took the same six to eight things each (the database, the client, RSSifier, the rules, the events, the monitor, what is under way), two of them with an exception from clippy's too_many_arguments, and each spawn cloned them one by one. fetch::Fetcher holds them and is cheap to copy; run, round, fetch_one and fetch_due are its methods, and Fetcher::new gives the tests one without RSSifier and with events and counts of its own. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Xidw9MHUJTuNTd11rpVAqX
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Point 2 of the review for maintainability, after #171.
round,fetch_oneandruninfetch.rseach took the same six to eight things: the database, the hardened client, RSSifier, the cleaning rules, the events, the monitor and what is under way.too_many_arguments.How
fetch::Fetcherholds the database, the client, RSSifier, the rules, the events and the monitor. It is cheap to copy, as each part is shared.run,round,fetch_oneandfetch_dueare its methods.roundtakes the pace and what is under way, andfetch_onetakes the feed.fetch_feed, which fetches one feed on its own for subscribing and the tests, keeps its signature.Fetcher::newgives the tests one without RSSifier and with events and counts of its own. A test that checks the counts or the events sets its own with..Fetcher::new(…).main.rs,bench fetchand the tests build aFetcherinstead of passing everything along.Both
too_many_argumentsexceptions infetch.rsare gone. The diff adds 209 lines and removes 270.Nothing the fetching does changes.
Checks
server/:cargo fmt --check,cargo clippy --all-targets -- -D warnings,cargo test(511), on main with Read the settings of serve in one tested place, and refuse a switch that is no switch #171;cargo docwith-D warnings.No query, type or route of the API changed.
Generated by Claude Code