1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2025-01-20 21:18:26 +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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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