Skip to content

Commit bc2cf46

Browse files
committed
apply rem. feedback from previously unresolved thread
1 parent 499d0c5 commit bc2cf46

File tree

1 file changed

+2
-2
lines changed
  • src/idiomatic/leveraging-the-type-system

1 file changed

+2
-2
lines changed

src/idiomatic/leveraging-the-type-system/raii.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@ fn main() -> Result<(), std::io::Error> {
6767
Normally, when the `file` variable in `main` goes out of scope (either on
6868
return or due to a panic), `drop()` is called automatically.
6969

70-
If the file is moved into another function, for example `read_all()`, the
71-
value is dropped when that function returns — not in `main`.
70+
If the file is moved into another function, the value is dropped when that
71+
function returns — not in `main`.
7272

7373
In contrast, C++ runs destructors in the original scope even for moved-from
7474
values.

0 commit comments

Comments
 (0)