Skip to content

Commit 2e6bc8a

Browse files
committed
fix(code-samples): ✏️ Shorten snippet line syntax
1 parent bb74be7 commit 2e6bc8a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

docs/generics/generic-constraints.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
The type parameter constraint for a generic class or method can constrain to a particular capability as seen previously:
66

77
```pony
8-
--8<-- "generics-foo-with-any-val.pony:1:1"
8+
--8<-- "generics-foo-with-any-val.pony::1"
99
```
1010

1111
Without the constraint, the generic must work for all possible capabilities. Sometimes you don't want to be limited to a specific capability and you can't support all capabilities. The solution for this is generic constraint qualifiers. These represent classes of capabilities that are accepted in the generic. The valid qualifiers are:

docs/generics/generics-and-reference-capabilities.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
In the examples presented previously we've explicitly set the reference capability to `val`:
44

55
```pony
6-
--8<-- "generics-foo-with-any-val.pony:1:1"
6+
--8<-- "generics-foo-with-any-val.pony::1"
77
```
88

99
If the capability is left out of the type parameter then the generic class or function can accept any reference capability. This would look like:

0 commit comments

Comments
 (0)