From 256542d9955811eac0c26b350f528cce1106dd50 Mon Sep 17 00:00:00 2001 From: ymgyt Date: Mon, 6 May 2024 23:41:44 +0900 Subject: [PATCH] refactor(feed): rename parse module to service --- crates/synd_api/src/dependency.rs | 2 +- crates/synd_api/src/gql/mutation/subscribe_feed.rs | 2 +- crates/synd_api/src/usecase/fetch_entries.rs | 2 +- crates/synd_api/src/usecase/fetch_subscribed_feeds.rs | 2 +- crates/synd_api/src/usecase/subscribe_feed.rs | 2 +- crates/synd_feed/src/feed/cache/mod.rs | 2 +- crates/synd_feed/src/feed/cache/periodic_refresher.rs | 2 +- crates/synd_feed/src/feed/mod.rs | 2 +- crates/synd_feed/src/feed/{parser.rs => service.rs} | 0 crates/synd_term/src/lib.rs | 1 + crates/synd_term/tests/test/helper.rs | 2 +- 11 files changed, 10 insertions(+), 9 deletions(-) rename crates/synd_feed/src/feed/{parser.rs => service.rs} (100%) diff --git a/crates/synd_api/src/dependency.rs b/crates/synd_api/src/dependency.rs index 8758ee40..86bdb062 100644 --- a/crates/synd_api/src/dependency.rs +++ b/crates/synd_api/src/dependency.rs @@ -4,7 +4,7 @@ use anyhow::Context; use axum_server::tls_rustls::RustlsConfig; use synd_feed::feed::{ cache::{CacheConfig, CacheLayer}, - parser::FeedService, + service::FeedService, }; use crate::{ diff --git a/crates/synd_api/src/gql/mutation/subscribe_feed.rs b/crates/synd_api/src/gql/mutation/subscribe_feed.rs index e706322f..6d237cd6 100644 --- a/crates/synd_api/src/gql/mutation/subscribe_feed.rs +++ b/crates/synd_api/src/gql/mutation/subscribe_feed.rs @@ -1,6 +1,6 @@ use async_graphql::{InputObject, Object, Union}; use synd_feed::{ - feed::parser::FetchFeedError, + feed::service::FetchFeedError, types::{Category, FeedUrl, Requirement}, }; diff --git a/crates/synd_api/src/usecase/fetch_entries.rs b/crates/synd_api/src/usecase/fetch_entries.rs index c4cd7e1c..fcdc829b 100644 --- a/crates/synd_api/src/usecase/fetch_entries.rs +++ b/crates/synd_api/src/usecase/fetch_entries.rs @@ -2,7 +2,7 @@ use std::{cmp::Ordering, collections::HashMap, sync::Arc}; use futures_util::{stream::FuturesUnordered, StreamExt}; use synd_feed::{ - feed::{cache::FetchCachedFeed, parser::FetchFeedError}, + feed::{cache::FetchCachedFeed, service::FetchFeedError}, types::{self, Annotated, Entry, EntryId, FeedMeta, FeedUrl}, }; use thiserror::Error; diff --git a/crates/synd_api/src/usecase/fetch_subscribed_feeds.rs b/crates/synd_api/src/usecase/fetch_subscribed_feeds.rs index 1db9e2c5..e0c7dad8 100644 --- a/crates/synd_api/src/usecase/fetch_subscribed_feeds.rs +++ b/crates/synd_api/src/usecase/fetch_subscribed_feeds.rs @@ -1,7 +1,7 @@ use std::sync::Arc; use synd_feed::{ - feed::{cache::FetchCachedFeed, parser::FetchFeedError}, + feed::{cache::FetchCachedFeed, service::FetchFeedError}, types::{self, Annotated, FeedUrl}, }; use thiserror::Error; diff --git a/crates/synd_api/src/usecase/subscribe_feed.rs b/crates/synd_api/src/usecase/subscribe_feed.rs index 818749d8..12923c68 100644 --- a/crates/synd_api/src/usecase/subscribe_feed.rs +++ b/crates/synd_api/src/usecase/subscribe_feed.rs @@ -1,7 +1,7 @@ use std::sync::Arc; use synd_feed::{ - feed::{cache::FetchCachedFeed, parser::FetchFeedError}, + feed::{cache::FetchCachedFeed, service::FetchFeedError}, types::{Annotated, Category, Feed, FeedUrl, Requirement}, }; use synd_o11y::metric; diff --git a/crates/synd_feed/src/feed/cache/mod.rs b/crates/synd_feed/src/feed/cache/mod.rs index ea9ee730..f4024ba7 100644 --- a/crates/synd_feed/src/feed/cache/mod.rs +++ b/crates/synd_feed/src/feed/cache/mod.rs @@ -4,7 +4,7 @@ use async_trait::async_trait; // use moka::future::Cache; use crate::{ - feed::parser::{FetchFeed, FetchFeedResult}, + feed::service::{FetchFeed, FetchFeedResult}, types::{self, FeedUrl}, }; diff --git a/crates/synd_feed/src/feed/cache/periodic_refresher.rs b/crates/synd_feed/src/feed/cache/periodic_refresher.rs index 6db45741..a50324aa 100644 --- a/crates/synd_feed/src/feed/cache/periodic_refresher.rs +++ b/crates/synd_feed/src/feed/cache/periodic_refresher.rs @@ -3,7 +3,7 @@ use std::{sync::Arc, time::Duration}; use synd_o11y::metric; use tracing::{error, info, warn}; -use crate::feed::parser::FetchFeed; +use crate::feed::service::FetchFeed; use super::Cache; diff --git a/crates/synd_feed/src/feed/mod.rs b/crates/synd_feed/src/feed/mod.rs index 0b431db0..cb92a3e6 100644 --- a/crates/synd_feed/src/feed/mod.rs +++ b/crates/synd_feed/src/feed/mod.rs @@ -1,2 +1,2 @@ pub mod cache; -pub mod parser; +pub mod service; diff --git a/crates/synd_feed/src/feed/parser.rs b/crates/synd_feed/src/feed/service.rs similarity index 100% rename from crates/synd_feed/src/feed/parser.rs rename to crates/synd_feed/src/feed/service.rs diff --git a/crates/synd_term/src/lib.rs b/crates/synd_term/src/lib.rs index e68e9a83..d3340da5 100644 --- a/crates/synd_term/src/lib.rs +++ b/crates/synd_term/src/lib.rs @@ -1,4 +1,5 @@ #![allow(clippy::new_without_default)] +#![warn(rustdoc::broken_intra_doc_links)] pub mod application; pub mod auth; diff --git a/crates/synd_term/tests/test/helper.rs b/crates/synd_term/tests/test/helper.rs index 183db510..5ebd415e 100644 --- a/crates/synd_term/tests/test/helper.rs +++ b/crates/synd_term/tests/test/helper.rs @@ -12,7 +12,7 @@ use synd_api::{ shutdown::Shutdown, usecase::{authorize::Authorizer, MakeUsecase, Runtime}, }; -use synd_feed::feed::{cache::CacheLayer, parser::FeedService}; +use synd_feed::feed::{cache::CacheLayer, service::FeedService}; use synd_term::terminal::Terminal; use tokio::net::{TcpListener, TcpStream};