@@ -184,7 +184,7 @@ if_std! {
184
184
185
185
fn start_send( self : PinMut <Self >, item: Self :: SinkItem ) -> Result <( ) , Self :: SinkError > {
186
186
// TODO: impl<T> Unpin for Vec<T> {}
187
- unsafe { PinMut :: get_mut ( self ) } . push( item) ;
187
+ unsafe { PinMut :: get_mut_unchecked ( self ) } . push( item) ;
188
188
Ok ( ( ) )
189
189
}
190
190
@@ -207,7 +207,7 @@ if_std! {
207
207
208
208
fn start_send( self : PinMut <Self >, item: Self :: SinkItem ) -> Result <( ) , Self :: SinkError > {
209
209
// TODO: impl<T> Unpin for Vec<T> {}
210
- unsafe { PinMut :: get_mut ( self ) } . push_back( item) ;
210
+ unsafe { PinMut :: get_mut_unchecked ( self ) } . push_back( item) ;
211
211
Ok ( ( ) )
212
212
}
213
213
@@ -257,7 +257,7 @@ impl<A, B> Sink for Either<A, B>
257
257
258
258
fn poll_ready ( self : PinMut < Self > , cx : & mut task:: Context ) -> Poll < Result < ( ) , Self :: SinkError > > {
259
259
unsafe {
260
- match PinMut :: get_mut ( self ) {
260
+ match PinMut :: get_mut_unchecked ( self ) {
261
261
Either :: Left ( x) => PinMut :: new_unchecked ( x) . poll_ready ( cx) ,
262
262
Either :: Right ( x) => PinMut :: new_unchecked ( x) . poll_ready ( cx) ,
263
263
}
@@ -266,7 +266,7 @@ impl<A, B> Sink for Either<A, B>
266
266
267
267
fn start_send ( self : PinMut < Self > , item : Self :: SinkItem ) -> Result < ( ) , Self :: SinkError > {
268
268
unsafe {
269
- match PinMut :: get_mut ( self ) {
269
+ match PinMut :: get_mut_unchecked ( self ) {
270
270
Either :: Left ( x) => PinMut :: new_unchecked ( x) . start_send ( item) ,
271
271
Either :: Right ( x) => PinMut :: new_unchecked ( x) . start_send ( item) ,
272
272
}
@@ -275,7 +275,7 @@ impl<A, B> Sink for Either<A, B>
275
275
276
276
fn poll_flush ( self : PinMut < Self > , cx : & mut task:: Context ) -> Poll < Result < ( ) , Self :: SinkError > > {
277
277
unsafe {
278
- match PinMut :: get_mut ( self ) {
278
+ match PinMut :: get_mut_unchecked ( self ) {
279
279
Either :: Left ( x) => PinMut :: new_unchecked ( x) . poll_flush ( cx) ,
280
280
Either :: Right ( x) => PinMut :: new_unchecked ( x) . poll_flush ( cx) ,
281
281
}
@@ -284,7 +284,7 @@ impl<A, B> Sink for Either<A, B>
284
284
285
285
fn poll_close ( self : PinMut < Self > , cx : & mut task:: Context ) -> Poll < Result < ( ) , Self :: SinkError > > {
286
286
unsafe {
287
- match PinMut :: get_mut ( self ) {
287
+ match PinMut :: get_mut_unchecked ( self ) {
288
288
Either :: Left ( x) => PinMut :: new_unchecked ( x) . poll_close ( cx) ,
289
289
Either :: Right ( x) => PinMut :: new_unchecked ( x) . poll_close ( cx) ,
290
290
}
0 commit comments