1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2025-05-14 22:56:44 +02:00

Update generic-traits.md (#2142)

Fix a typo.
This commit is contained in:
GeorgNeis 2024-06-14 01:18:45 +09:00 committed by GitHub
parent d2f8fc4ac5
commit 1723baee47
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -37,7 +37,7 @@ fn main() {
is simple.
- Implementations of the trait do not need to cover all possible type
parameters. Here, `Foo::From("hello")` would not compile because there is no
parameters. Here, `Foo::from("hello")` would not compile because there is no
`From<&str>` implementation for `Foo`.
- Generic traits take types as "input", while associated types are a kind of