Skip to content

Commit

Permalink
Update changelog with generics support
Browse files Browse the repository at this point in the history
  • Loading branch information
AzureMarker committed Jun 1, 2020
1 parent cf28d76 commit c6e301f
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,27 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
### Added
- Support generics in derives and the `module` macro. For example:
```rust
use shaku::{module, Component, Interface, HasComponent};

trait MyComponent<T: Interface>: Interface {}

#[derive(Component)]
#[shaku(interface = MyComponent<T>)]
struct MyComponentImpl<T: Interface + Default> {
value: T
}
impl<T: Interface + Default> MyComponent<T> for MyComponentImpl<T> {}

module! {
MyModule<T: Interface + Default> {
components = [MyComponentImpl<T>],
providers = []
}
}
```

## [0.4.0] - 2020-05-26
### Breaking Changes
Expand Down

0 comments on commit c6e301f

Please sign in to comment.