aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2023-09-16 15:35:56 +0200
committerHampusM <hampus@hampusmat.com>2023-09-16 15:35:56 +0200
commit8b4cb39890016394122a799929aee6662980025b (patch)
tree5a984c4d652669ab401054c091f876faaf84bea8
parentda7426ccb4aae87b322a884c31c6e5136c40927f (diff)
refactor!: remove async DI container prelude module
BREAKING CHANGE: The async DI container prelude module have been removed as it is no longer necessary seeing as the async DI container interface have been removed
-rw-r--r--examples/async-factory/main.rs3
-rw-r--r--examples/async/bootstrap.rs3
-rw-r--r--src/di_container/asynchronous/binding/builder.rs10
-rw-r--r--src/di_container/asynchronous/mod.rs4
-rw-r--r--src/di_container/asynchronous/prelude.rs3
5 files changed, 8 insertions, 15 deletions
diff --git a/examples/async-factory/main.rs b/examples/async-factory/main.rs
index a441842..f0365a1 100644
--- a/examples/async-factory/main.rs
+++ b/examples/async-factory/main.rs
@@ -5,10 +5,9 @@
use std::time::Duration;
use anyhow::Result;
-use syrette::di_container::asynchronous::prelude::*;
use syrette::future::BoxFuture;
use syrette::ptr::TransientPtr;
-use syrette::{declare_default_factory, factory};
+use syrette::{declare_default_factory, factory, AsyncDIContainer};
use tokio::time::sleep;
trait IFoo: Send + Sync
diff --git a/examples/async/bootstrap.rs b/examples/async/bootstrap.rs
index 5f90d88..9b495c2 100644
--- a/examples/async/bootstrap.rs
+++ b/examples/async/bootstrap.rs
@@ -1,9 +1,8 @@
use std::sync::Arc;
use anyhow::Result;
-use syrette::declare_default_factory;
-use syrette::di_container::asynchronous::prelude::*;
use syrette::ptr::TransientPtr;
+use syrette::{declare_default_factory, AsyncDIContainer};
use crate::animals::cat::Cat;
use crate::animals::dog::Dog;
diff --git a/src/di_container/asynchronous/binding/builder.rs b/src/di_container/asynchronous/binding/builder.rs
index 7050847..c253929 100644
--- a/src/di_container/asynchronous/binding/builder.rs
+++ b/src/di_container/asynchronous/binding/builder.rs
@@ -62,7 +62,7 @@ where
/// # use std::error::Error;
/// #
/// # use syrette::injectable;
- /// # use syrette::di_container::asynchronous::prelude::*;
+ /// # use syrette::AsyncDIContainer;
/// #
/// # trait Foo: Send + Sync {}
/// #
@@ -130,7 +130,7 @@ where
/// # use std::error::Error;
/// #
/// # use syrette::{factory};
- /// # use syrette::di_container::asynchronous::prelude::*;
+ /// # use syrette::AsyncDIContainer;
/// # use syrette::ptr::TransientPtr;
/// #
/// # trait Foo: Send + Sync {}
@@ -220,7 +220,7 @@ where
/// # use std::time::Duration;
/// #
/// # use syrette::{factory};
- /// # use syrette::di_container::asynchronous::prelude::*;
+ /// # use syrette::AsyncDIContainer;
/// # use syrette::ptr::TransientPtr;
/// # use syrette::future::BoxFuture;
/// #
@@ -320,7 +320,7 @@ where
/// ```
/// # use std::error::Error;
/// #
- /// # use syrette::di_container::asynchronous::prelude::*;
+ /// # use syrette::AsyncDIContainer;
/// # use syrette::ptr::TransientPtr;
/// #
/// # trait Foo: Send + Sync {}
@@ -410,7 +410,7 @@ where
/// # use std::error::Error;
/// # use std::time::Duration;
/// #
- /// # use syrette::di_container::asynchronous::prelude::*;
+ /// # use syrette::AsyncDIContainer;
/// # use syrette::ptr::TransientPtr;
/// #
/// # trait Foo: Send + Sync {}
diff --git a/src/di_container/asynchronous/mod.rs b/src/di_container/asynchronous/mod.rs
index 73b1382..c2b4f6f 100644
--- a/src/di_container/asynchronous/mod.rs
+++ b/src/di_container/asynchronous/mod.rs
@@ -5,8 +5,7 @@
//! use std::collections::HashMap;
//! use std::error::Error;
//!
-//! use syrette::di_container::asynchronous::prelude::*;
-//! use syrette::injectable;
+//! use syrette::{injectable, AsyncDIContainer};
//!
//! trait IDatabaseService: Send + Sync
//! {
@@ -70,7 +69,6 @@ use crate::util::use_double;
use_double!(crate::dependency_history::DependencyHistory);
pub mod binding;
-pub mod prelude;
/// Async dependency injection container.
pub struct AsyncDIContainer
diff --git a/src/di_container/asynchronous/prelude.rs b/src/di_container/asynchronous/prelude.rs
deleted file mode 100644
index afbb0a2..0000000
--- a/src/di_container/asynchronous/prelude.rs
+++ /dev/null
@@ -1,3 +0,0 @@
-//! Commonly used types.
-
-pub use crate::di_container::asynchronous::AsyncDIContainer;