mirror of
https://git.asonix.dog/asonix/pict-rs
synced 2024-12-22 19:31:35 +00:00
Make running pict-rs fluent
This commit is contained in:
parent
3ca994ee31
commit
a390b21df1
2 changed files with 7 additions and 5 deletions
|
@ -1531,8 +1531,9 @@ impl PictRsConfiguration {
|
||||||
///
|
///
|
||||||
/// This is probably not useful for 3rd party applications that install their own tracing
|
/// This is probably not useful for 3rd party applications that install their own tracing
|
||||||
/// subscribers.
|
/// subscribers.
|
||||||
pub fn install_tracing(&self) -> color_eyre::Result<()> {
|
pub fn install_tracing(self) -> color_eyre::Result<Self> {
|
||||||
init_tracing(&self.config.tracing)
|
init_tracing(&self.config.tracing)?;
|
||||||
|
Ok(self)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Run the pict-rs application
|
/// Run the pict-rs application
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
#[actix_rt::main]
|
#[actix_rt::main]
|
||||||
async fn main() -> color_eyre::Result<()> {
|
async fn main() -> color_eyre::Result<()> {
|
||||||
let pict_rs = pict_rs::PictRsConfiguration::build_default()?;
|
pict_rs::PictRsConfiguration::build_default()?
|
||||||
pict_rs.install_tracing()?;
|
.install_tracing()?
|
||||||
pict_rs.run().await
|
.run()
|
||||||
|
.await
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue