@@ -734,7 +734,7 @@ impl OpenOptions {
734
734
/// let file = options.read(true).open("foo.txt");
735
735
/// ```
736
736
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
737
- pub fn new ( ) -> OpenOptions {
737
+ pub fn new ( ) -> Self {
738
738
OpenOptions ( fs_imp:: OpenOptions :: new ( ) )
739
739
}
740
740
@@ -751,7 +751,7 @@ impl OpenOptions {
751
751
/// let file = OpenOptions::new().read(true).open("foo.txt");
752
752
/// ```
753
753
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
754
- pub fn read ( & mut self , read : bool ) -> & mut OpenOptions {
754
+ pub fn read ( & mut self , read : bool ) -> & mut Self {
755
755
self . 0 . read ( read) ;
756
756
self
757
757
}
@@ -772,7 +772,7 @@ impl OpenOptions {
772
772
/// let file = OpenOptions::new().write(true).open("foo.txt");
773
773
/// ```
774
774
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
775
- pub fn write ( & mut self , write : bool ) -> & mut OpenOptions {
775
+ pub fn write ( & mut self , write : bool ) -> & mut Self {
776
776
self . 0 . write ( write) ;
777
777
self
778
778
}
@@ -819,7 +819,7 @@ impl OpenOptions {
819
819
/// let file = OpenOptions::new().append(true).open("foo.txt");
820
820
/// ```
821
821
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
822
- pub fn append ( & mut self , append : bool ) -> & mut OpenOptions {
822
+ pub fn append ( & mut self , append : bool ) -> & mut Self {
823
823
self . 0 . append ( append) ;
824
824
self
825
825
}
@@ -839,7 +839,7 @@ impl OpenOptions {
839
839
/// let file = OpenOptions::new().write(true).truncate(true).open("foo.txt");
840
840
/// ```
841
841
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
842
- pub fn truncate ( & mut self , truncate : bool ) -> & mut OpenOptions {
842
+ pub fn truncate ( & mut self , truncate : bool ) -> & mut Self {
843
843
self . 0 . truncate ( truncate) ;
844
844
self
845
845
}
@@ -860,7 +860,7 @@ impl OpenOptions {
860
860
/// let file = OpenOptions::new().write(true).create(true).open("foo.txt");
861
861
/// ```
862
862
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
863
- pub fn create ( & mut self , create : bool ) -> & mut OpenOptions {
863
+ pub fn create ( & mut self , create : bool ) -> & mut Self {
864
864
self . 0 . create ( create) ;
865
865
self
866
866
}
@@ -893,7 +893,7 @@ impl OpenOptions {
893
893
/// .open("foo.txt");
894
894
/// ```
895
895
#[ stable( feature = "expand_open_options2" , since = "1.9.0" ) ]
896
- pub fn create_new ( & mut self , create_new : bool ) -> & mut OpenOptions {
896
+ pub fn create_new ( & mut self , create_new : bool ) -> & mut Self {
897
897
self . 0 . create_new ( create_new) ;
898
898
self
899
899
}
0 commit comments