mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-12-13 06:08:20 +00:00
797aac7281
* Check for error when fetching link metadata (fixes #5127) * use error_for_status everywhere * dont ignore errors * enable lint * fixes * review * more review
25 lines
696 B
Rust
25 lines
696 B
Rust
use clap::Parser;
|
|
use lemmy_server::{start_lemmy_server, CmdArgs};
|
|
use lemmy_utils::error::{LemmyErrorType, LemmyResult};
|
|
use tracing::level_filters::LevelFilter;
|
|
use tracing_subscriber::EnvFilter;
|
|
|
|
pub extern crate rustls;
|
|
|
|
#[tokio::main]
|
|
pub async fn main() -> LemmyResult<()> {
|
|
let filter = EnvFilter::builder()
|
|
.with_default_directive(LevelFilter::INFO.into())
|
|
.from_env_lossy();
|
|
tracing_subscriber::fmt().with_env_filter(filter).init();
|
|
|
|
let args = CmdArgs::parse();
|
|
|
|
rustls::crypto::ring::default_provider()
|
|
.install_default()
|
|
.map_err(|_e| LemmyErrorType::Unknown("Failed to install rustls crypto provider".into()))?;
|
|
|
|
start_lemmy_server(args).await?;
|
|
Ok(())
|
|
}
|