Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Neo-Ciber94 committed Apr 27, 2022
1 parent a94d415 commit 9808789
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
3 changes: 1 addition & 2 deletions dilib-experimental/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@ name = "dilib-experimental"
description = "Here I just throw things that may or may not be released"
version = "0.0.0"
edition = "2021"
rust-version = "1.59.0"
publish = false

[dependencies]
dilib = { path ="../dilib", features=["full", "unstable_provide"] }
dilib = { path ="../dilib", features=["full"] }
casey = "0.3.3"
2 changes: 1 addition & 1 deletion dilib/src/key.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use std::any::TypeId;
use std::borrow::Cow;

/// Represents an unique key for value provider.
/// Represents an unique key for identify a provider.
#[derive(Debug, Clone, Ord, PartialOrd, Eq, PartialEq, Hash)]
pub struct InjectionKey<'a> {
type_id: TypeId,
Expand Down
3 changes: 2 additions & 1 deletion dilib/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,6 @@ pub mod macros {
#[cfg(feature = "unstable_provide")]
pub use macros::*;

#[doc(hidden)]
#[cfg(feature = "unstable_provide")]
pub use ctor::*;
pub use ctor::ctor;
2 changes: 1 addition & 1 deletion dilib/src/resolved.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ impl<T> Resolved<T> {
}
}

/// Attempts to downcast the value to a value.
/// Attempts to downcast the value to a scoped.
pub fn into_scoped(self) -> Option<T> {
match self {
Resolved::Scoped(t) => Some(t),
Expand Down
4 changes: 2 additions & 2 deletions samples/provide/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ fn main() {
seeder.init_db().unwrap();

let food_repository =
resolve!(trait Repository<Food>).expect("Failed to resolve FoodRepository");
resolve!(trait Repository<Food>).expect("Failed to resolve Repository<Food>");

let restaurant_repository =
resolve!(trait Repository<Restaurant>).expect("Failed to resolve RestaurantRepository");
resolve!(trait Repository<Restaurant>).expect("Failed to resolve Repository<Restaurant>");

// Makes a join to get the restaurant menus
let restaurant_menus = restaurant_repository
Expand Down

0 comments on commit 9808789

Please sign in to comment.