Lines of
src/main.rs
from check-in dc7c43b010
that are changed by the sequence of edits moving toward
check-in 4c144972c0:
1: //! This is telegram bot to fetch RSS/ATOM feeds and post results on public
2: //! channels
3:
4: #![warn(missing_docs)]
5:
6: mod command;
7: mod core;
8: mod sql;
9:
10: use async_compat::Compat;
11: use stacked_errors::{
12: Result,
13: StackableErr,
14: };
15: use tgbot::handler::LongPoll;
16:
17: fn main () -> Result<()> {
dc7c43b010 2026-01-01 18: smol::future::block_on(Compat::new(async {
19: async_main().await.unwrap();
20: }));
21:
22: Ok(())
23: }
24:
25: async fn async_main () -> Result<()> {
26: let settings = config::Config::builder()
27: .set_default("api_gateway", "https://api.telegram.org").stack()?
28: .add_source(config::File::with_name("rsstg"))
29: .build()
30: .stack()?;
31:
32: let core = core::Core::new(settings).await.stack()?;
33:
34: LongPoll::new(core.tg.clone(), core).run().await;
35:
36: Ok(())
37: }