File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
content/lessons/05_types_reasoning Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -339,15 +339,15 @@ The problem here is that nothing hinders us from implement the trait (with vario
339339
340340The use of generic types in ` Summary ` trait makes it semantics like this:
341341
342- > Any type can be summarized with any type supporting it.
342+ > A type can be summarized with any type supporting it.
343343
344- When we want the trait to require exactly one possible generic implementation for a given type, we can leverage _ associated types _ . Example here:
344+ When we want the trait to require exactly one possible generic implementation for a given type, we can leverage * associated types * . Example here:
345345
346346{{ include_code_sample(path="lessons/05_types_reasoning/trait_associated_type.rs", language="rust") }}
347347
348348The use of associated types in Summary trait makes it semantics like this:
349349
350- > Any type can be summarized with at most one specific type.
350+ > A type can be summarized with at most one specific type.
351351
352352Yet another approach (arguably, the cleanest one) would be to use the ` impl trait ` syntax in a trait (quite recently stabilized!).
353353Example:
You can’t perform that action at this time.
0 commit comments