mirror of
https://github.com/YGGverse/rssto.git
synced 2026-03-31 17:15:29 +00:00
remove self mutable dependency as pool
This commit is contained in:
parent
e7e3969e00
commit
eedc9c06fc
1 changed files with 3 additions and 3 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue