From eedc9c06fc016126eb285652a74fff5946cf2435 Mon Sep 17 00:00:00 2001 From: yggverse Date: Wed, 7 Jan 2026 22:22:08 +0200 Subject: [PATCH] remove self mutable dependency as pool --- crates/crawler/src/main.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/crawler/src/main.rs b/crates/crawler/src/main.rs index 2c5c414..c221040 100644 --- a/crates/crawler/src/main.rs +++ b/crates/crawler/src/main.rs @@ -28,7 +28,7 @@ fn main() -> Result<()> { let argument = Argument::parse(); let config: config::Config = toml::from_str(&read_to_string(argument.config)?)?; - let mut database = Mysql::connect( + let database = Mysql::connect( &config.mysql.host, config.mysql.port, &config.mysql.user, @@ -41,7 +41,7 @@ fn main() -> Result<()> { debug!("Begin new crawl queue..."); for c in &config.channel { debug!("Update `{}`...", c.url); - if let Err(e) = crawl(&mut database, c) { + if let Err(e) = crawl(&database, c) { warn!("Channel `{}` update failed: `{e}`", c.url) } } @@ -55,7 +55,7 @@ fn main() -> Result<()> { } } -fn crawl(db: &mut Mysql, channel_config: &config::Channel) -> Result<()> { +fn crawl(db: &Mysql, channel_config: &config::Channel) -> Result<()> { use rss::Channel; use scraper::Selector;