1 2 3 4 5 6 7 8 9 10 11 12 13 14
use crate::settings::Settings; use anyhow::{Context, Result}; pub struct App { pub config: Settings, } impl App { pub fn new() -> Result<Self> { Ok(Self { config: Settings::new().context("Failed to initialize configuration")?, }) } }