File tree 1 file changed +6
-4
lines changed
1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -823,9 +823,11 @@ impl<F> NamedTempFile<F> {
823
823
& mut self . file
824
824
}
825
825
826
- /// Convert the temporary file into a `std::fs::File`.
826
+ /// Turn this named temporary file into an "unnamed" temporary file as if you
827
+ /// had constructed it with [`tempfile()`].
827
828
///
828
- /// The inner file will be deleted.
829
+ /// The underlying file will be removed from the filesystem but the returned [`File`]
830
+ /// can still be read/written.
829
831
pub fn into_file ( self ) -> F {
830
832
self . file
831
833
}
@@ -840,8 +842,8 @@ impl<F> NamedTempFile<F> {
840
842
841
843
/// Converts the named temporary file into its constituent parts.
842
844
///
843
- /// Note: When the path is dropped, the file is deleted but the file handle
844
- /// is still usable .
845
+ /// Note: When the path is dropped, the underlying file will be removed from the filesystem but
846
+ /// the returned [`File`] can still be read/written .
845
847
pub fn into_parts ( self ) -> ( F , TempPath ) {
846
848
( self . file , self . path )
847
849
}
You can’t perform that action at this time.
0 commit comments