mirror of
https://github.com/rust-lang-cn/book-cn.git
synced 2025-02-03 07:48:41 +08:00
Remove a sentence that didn't really say anything
This commit is contained in:
parent
e6e56ed7d4
commit
df309071ee
@ -1,9 +1,8 @@
|
||||
## Traits
|
||||
|
||||
Rust has a feature called *traits*. Traits are similar to a feature often
|
||||
called 'interfaces' in other languages, but are also different. Traits let us
|
||||
do another kind of abstraction: they let us abstract over *behavior* that types
|
||||
can have in common.
|
||||
*Traits* are similar to a feature often called 'interfaces' in other languages,
|
||||
but are also different. Traits let us do another kind of abstraction: they let
|
||||
us abstract over *behavior* that types can have in common.
|
||||
|
||||
When we use a generic type parameter, we are telling Rust that any type is
|
||||
valid in that location. When other code *uses* a value that could be of any
|
||||
|
Loading…
Reference in New Issue
Block a user