Skip to content

Commit

Permalink
fix combine fn example
Browse files Browse the repository at this point in the history
  • Loading branch information
0xNeshi committed Dec 30, 2024
1 parent 3f53995 commit 99b5d6e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion concepts/associated-items/about.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Here, `Result` is an associated type determined by each implementation.
A function using this trait doesn't need to specify extra generics:

```rust
fn combine<T: Pack<T>>(a: T, b: T) -> T::Result {
fn combine<T, impl PackImpl: Pack<T>>(a: T, b: T) -> PackImpl::Result {
a.pack(b)
}
```
Expand Down

0 comments on commit 99b5d6e

Please sign in to comment.