Skip to content

Commit 9942326

Browse files
committed
Empty sounds like the body of the constructor is empty
1 parent 0e85135 commit 9942326

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/predictability.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ In Rust, "constructors" are just a convention. There are a variety of
157157
conventions around constructor naming, and the distinctions are often
158158
subtle.
159159

160-
A constructor in it's most basic form is an empty `new` method:
160+
A constructor in it's most basic form is a `new` method with no arguments.
161161

162162
```rust
163163
impl<T> Example<T> {
@@ -202,7 +202,7 @@ writing a `From` implementation vs. writing `from_foo` need further
202202
examination.
203203

204204
Note that it is common and expected for types to implement both
205-
`Default` and an empty `new` constructor. `new` is the constructor
205+
`Default` and a `new` constructor. `new` is the constructor
206206
convention in Rust, and users expect it to exist, so if it is
207207
reasonable for the basic constructor to take no arguments, then it
208208
should, even if it is functionally identical to `default`.

0 commit comments

Comments
 (0)