File tree 1 file changed +2
-23
lines changed
1 file changed +2
-23
lines changed Original file line number Diff line number Diff line change @@ -191,29 +191,8 @@ pub trait Write {
191
191
/// assert_eq!(&buf, "world");
192
192
/// ```
193
193
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
194
- fn write_fmt ( & mut self , args : Arguments ) -> Result {
195
- // This Adapter is needed to allow `self` (of type `&mut
196
- // Self`) to be cast to a Write (below) without
197
- // requiring a `Sized` bound.
198
- struct Adapter < ' a , T : ?Sized +' a > ( & ' a mut T ) ;
199
-
200
- impl < T : ?Sized > Write for Adapter < ' _ , T >
201
- where T : Write
202
- {
203
- fn write_str ( & mut self , s : & str ) -> Result {
204
- self . 0 . write_str ( s)
205
- }
206
-
207
- fn write_char ( & mut self , c : char ) -> Result {
208
- self . 0 . write_char ( c)
209
- }
210
-
211
- fn write_fmt ( & mut self , args : Arguments ) -> Result {
212
- self . 0 . write_fmt ( args)
213
- }
214
- }
215
-
216
- write ( & mut Adapter ( self ) , args)
194
+ fn write_fmt ( mut self : & mut Self , args : Arguments ) -> Result {
195
+ write ( & mut self , args)
217
196
}
218
197
}
219
198
You can’t perform that action at this time.
0 commit comments