1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2025-06-22 16:57:41 +02:00

Clarification in Trait Objects. (#379)

This commit is contained in:
gendx
2023-02-09 21:51:08 +00:00
committed by GitHub
parent 91eec89c52
commit 710fd526b4

View File

@ -66,7 +66,7 @@ Memory layout after allocating `xs`:
'- - - - - - - - - - - - - - - - - - - - - - - -'
```
Similarly, you need a trait object if you want to return different values
Similarly, you need a trait object if you want to return different types
implementing a trait:
```rust,editable