From 8be9625e2e65df6c7174272f78893394fca209e1 Mon Sep 17 00:00:00 2001 From: Jack O'Connor Date: Tue, 31 May 2016 17:12:08 -0400 Subject: [PATCH 1/2] document that Files close themselves automatically --- src/libstd/fs.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/libstd/fs.rs b/src/libstd/fs.rs index 734f774043d..fcc84e54842 100644 --- a/src/libstd/fs.rs +++ b/src/libstd/fs.rs @@ -32,6 +32,9 @@ /// it was opened with. Files also implement `Seek` to alter the logical cursor /// that the file contains internally. /// +/// Files are automatically closed when they go out of scope, so there is no +/// explicit `close` method. +/// /// # Examples /// /// ```no_run From df8d5baab7b7e9970545419c0e6bf781ea86b12c Mon Sep 17 00:00:00 2001 From: Jack O'Connor Date: Wed, 1 Jun 2016 10:16:45 -0400 Subject: [PATCH 2/2] allow for the future addition of a close method on File --- src/libstd/fs.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/libstd/fs.rs b/src/libstd/fs.rs index fcc84e54842..60c2a516d6a 100644 --- a/src/libstd/fs.rs +++ b/src/libstd/fs.rs @@ -32,8 +32,7 @@ /// it was opened with. Files also implement `Seek` to alter the logical cursor /// that the file contains internally. /// -/// Files are automatically closed when they go out of scope, so there is no -/// explicit `close` method. +/// Files are automatically closed when they go out of scope. /// /// # Examples ///