mirror of
https://git.asonix.dog/asonix/pict-rs
synced 2024-12-22 11:21:24 +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
|
||||
/// subscribers.
|
||||
pub fn install_tracing(&self) -> color_eyre::Result<()> {
|
||||
init_tracing(&self.config.tracing)
|
||||
pub fn install_tracing(self) -> color_eyre::Result<Self> {
|
||||
init_tracing(&self.config.tracing)?;
|
||||
Ok(self)
|
||||
}
|
||||
|
||||
/// Run the pict-rs application
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#[actix_rt::main]
|
||||
async fn main() -> color_eyre::Result<()> {
|
||||
let pict_rs = pict_rs::PictRsConfiguration::build_default()?;
|
||||
pict_rs.install_tracing()?;
|
||||
pict_rs.run().await
|
||||
pict_rs::PictRsConfiguration::build_default()?
|
||||
.install_tracing()?
|
||||
.run()
|
||||
.await
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue