Skip to content

Commit 3da1948

Browse files
committed
Revise editorially
1 parent 53e43ae commit 3da1948

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

src/dynamically-sized-types.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,15 @@ r[dynamic-sized]
22
# Dynamically Sized Types
33

44
r[dynamic-sized.intro]
5-
Most types have a fixed size that is known at compile time and implement the
6-
trait [`Sized`][sized]. A type with a size that is known only at run-time is
7-
called a _dynamically sized type_ (_DST_) or, informally, an unsized type.
8-
[Slices], [trait objects], and [str] are three examples of <abbr title="dynamically sized
9-
types">DSTs</abbr>.
5+
Most types have a fixed size that is known at compile time and implement the trait [`Sized`][sized]. A type with a size that is known only at run-time is called a _dynamically sized type_ (_DST_) or, informally, an unsized type. [Slices], [trait objects], and [str] are examples of <abbr title="dynamically sized types">DSTs</abbr>.
106

117
r[dynamic-sized.restriction]
128
Such types can only be used in certain cases:
139

1410
r[dynamic-sized.pointer-types]
1511
* [Pointer types] to <abbr title="dynamically sized types">DSTs</abbr> are
1612
sized but have twice the size of pointers to sized types
17-
* Pointers to slices and `str` also store the number of elements of the slice.
13+
* Pointers to slices and `str` also store the number of elements.
1814
* Pointers to trait objects also store a pointer to a vtable.
1915

2016
r[dynamic-sized.question-sized]

src/type-layout.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,7 @@ Slices have the same layout as the section of the array they slice.
109109
r[layout.str]
110110
## `str` Layout
111111

112-
String slices are a UTF-8 representation of characters that have the same layout as slices of type `[u8]`.
113-
A reference `&str` has the same layout as a reference `&[u8]`.
112+
String slices are a UTF-8 representation of characters that have the same layout as slices of type `[u8]`. A reference `&str` has the same layout as a reference `&[u8]`.
114113

115114
r[layout.tuple]
116115
## Tuple Layout

0 commit comments

Comments
 (0)