Skip to content

Commit

Permalink
chore: lint code
Browse files Browse the repository at this point in the history
  • Loading branch information
kwaa committed May 2, 2024
1 parent e3d81da commit 41b3fec
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
1 change: 0 additions & 1 deletion crates/utils/src/data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ pub struct AppEnv {
}

impl AppEnv {
#[must_use]
pub fn init() -> Result<Self, AppError> {
Ok(Self {
hatsu_database_url: env::var("HATSU_DATABASE_URL")
Expand Down
7 changes: 4 additions & 3 deletions crates/utils/src/user/feed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,13 @@ pub struct Feed {
}

impl Feed {
/// 从网站获取 Feed 链接
/// # Panics
///
/// No panic here.
pub async fn get_site_feed(domain: String) -> Result<Self, AppError> {
fn feed_auto_discovery(head: &ElementRef, domain: &str, kind: &str) -> Option<Url> {
head.select(
&Selector::parse(&format!("link[rel=\"alternate\"][type=\"{kind}\"]"))
.expect("missing selector"),
&Selector::parse(&format!("link[rel=\"alternate\"][type=\"{kind}\"]")).unwrap(),
)
.next()
.and_then(|link| {
Expand Down

0 comments on commit 41b3fec

Please sign in to comment.