@@ -502,6 +502,7 @@ impl AsHandle for fs::File {
502
502
503
503
#[ stable( feature = "io_safety" , since = "1.63.0" ) ]
504
504
impl From < fs:: File > for OwnedHandle {
505
+ /// Takes ownership of a [`File`](fs::File)'s underlying file handle.
505
506
#[ inline]
506
507
fn from ( file : fs:: File ) -> OwnedHandle {
507
508
file. into_inner ( ) . into_inner ( ) . into_inner ( )
@@ -510,6 +511,7 @@ impl From<fs::File> for OwnedHandle {
510
511
511
512
#[ stable( feature = "io_safety" , since = "1.63.0" ) ]
512
513
impl From < OwnedHandle > for fs:: File {
514
+ /// Returns a [`File`](fs::File) that takes ownership of the given handle.
513
515
#[ inline]
514
516
fn from ( owned : OwnedHandle ) -> Self {
515
517
Self :: from_inner ( FromInner :: from_inner ( FromInner :: from_inner ( owned) ) )
@@ -574,6 +576,7 @@ impl AsHandle for crate::process::ChildStdin {
574
576
575
577
#[ stable( feature = "io_safety" , since = "1.63.0" ) ]
576
578
impl From < crate :: process:: ChildStdin > for OwnedHandle {
579
+ /// Takes ownership of a [`ChildStdin`](crate::process::ChildStdin)'s file handle.
577
580
#[ inline]
578
581
fn from ( child_stdin : crate :: process:: ChildStdin ) -> OwnedHandle {
579
582
unsafe { OwnedHandle :: from_raw_handle ( child_stdin. into_raw_handle ( ) ) }
@@ -590,6 +593,7 @@ impl AsHandle for crate::process::ChildStdout {
590
593
591
594
#[ stable( feature = "io_safety" , since = "1.63.0" ) ]
592
595
impl From < crate :: process:: ChildStdout > for OwnedHandle {
596
+ /// Takes ownership of a [`ChildStdout`](crate::process::ChildStdout)'s file handle.
593
597
#[ inline]
594
598
fn from ( child_stdout : crate :: process:: ChildStdout ) -> OwnedHandle {
595
599
unsafe { OwnedHandle :: from_raw_handle ( child_stdout. into_raw_handle ( ) ) }
@@ -606,6 +610,7 @@ impl AsHandle for crate::process::ChildStderr {
606
610
607
611
#[ stable( feature = "io_safety" , since = "1.63.0" ) ]
608
612
impl From < crate :: process:: ChildStderr > for OwnedHandle {
613
+ /// Takes ownership of a [`ChildStderr`](crate::process::ChildStderr)'s file handle.
609
614
#[ inline]
610
615
fn from ( child_stderr : crate :: process:: ChildStderr ) -> OwnedHandle {
611
616
unsafe { OwnedHandle :: from_raw_handle ( child_stderr. into_raw_handle ( ) ) }
0 commit comments