mirror of
https://github.com/google/comprehensive-rust.git
synced 2025-03-20 06:21:09 +02:00
Update trait-bounds.md (#2295)
We are going to talk about `impl Trait` in the very next slide. Let's don't duplicate it here and complicate the flow?
This commit is contained in:
parent
56ae649097
commit
127202d591
@ -7,7 +7,7 @@ minutes: 8
|
||||
When working with generics, you often want to require the types to implement
|
||||
some trait, so that you can call this trait's methods.
|
||||
|
||||
You can do this with `T: Trait` or `impl Trait`:
|
||||
You can do this with `T: Trait`:
|
||||
|
||||
```rust,editable
|
||||
fn duplicate<T: Clone>(a: T) -> (T, T) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user