From dd6ae0c8643f08114469ccff66615b45ccf5e13e Mon Sep 17 00:00:00 2001 From: HampusM Date: Sun, 28 Aug 2022 13:01:22 +0200 Subject: docs: use anyhow in the unbound example --- examples/unbound/bootstrap.rs | 5 ++--- examples/unbound/main.rs | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/examples/unbound/bootstrap.rs b/examples/unbound/bootstrap.rs index f59bc83..30366a6 100644 --- a/examples/unbound/bootstrap.rs +++ b/examples/unbound/bootstrap.rs @@ -1,5 +1,4 @@ -use std::error::Error; - +use anyhow::Result; use syrette::DIContainer; // Concrete implementations @@ -12,7 +11,7 @@ use crate::interfaces::animal_store::IAnimalStore; use crate::interfaces::dog::IDog; use crate::interfaces::human::IHuman; -pub fn bootstrap() -> Result> +pub fn bootstrap() -> Result { let mut di_container: DIContainer = DIContainer::new(); diff --git a/examples/unbound/main.rs b/examples/unbound/main.rs index e9a8feb..f8dddbb 100644 --- a/examples/unbound/main.rs +++ b/examples/unbound/main.rs @@ -2,7 +2,7 @@ #![deny(clippy::pedantic)] #![allow(clippy::module_name_repetitions)] -use std::error::Error; +use anyhow::Result; mod animal_store; mod animals; @@ -13,7 +13,7 @@ use bootstrap::bootstrap; use interfaces::dog::IDog; use interfaces::human::IHuman; -fn main() -> Result<(), Box> +fn main() -> Result<()> { println!("Hello, world!"); -- cgit v1.2.3-18-g5258