Skip to content

Commit d1271ec

Browse files
committed
Rename poll_vectored_* to poll_*_vectored
Make it in the same order as std.
1 parent e576173 commit d1271ec

File tree

2 files changed

+17
-17
lines changed

2 files changed

+17
-17
lines changed

futures-io/src/lib.rs

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ mod if_std {
140140
/// `Poll::Pending` and either internally retry or convert
141141
/// `Interrupted` into another error kind.
142142
#[cfg(feature = "iovec")]
143-
fn poll_vectored_read(self: Pin<&mut Self>, cx: &mut Context<'_>, vec: &mut [IoVecMut<'_>])
143+
fn poll_read_vectored(self: Pin<&mut Self>, cx: &mut Context<'_>, vec: &mut [IoVecMut<'_>])
144144
-> Poll<Result<usize>>
145145
{
146146
if let Some(ref mut first_iovec) = vec.get_mut(0) {
@@ -202,7 +202,7 @@ mod if_std {
202202
/// `Poll::Pending` and either internally retry or convert
203203
/// `Interrupted` into another error kind.
204204
#[cfg(feature = "iovec")]
205-
fn poll_vectored_write(self: Pin<&mut Self>, cx: &mut Context<'_>, vec: &[IoVec<'_>])
205+
fn poll_write_vectored(self: Pin<&mut Self>, cx: &mut Context<'_>, vec: &[IoVec<'_>])
206206
-> Poll<Result<usize>>
207207
{
208208
if let Some(ref first_iovec) = vec.get(0) {
@@ -262,10 +262,10 @@ mod if_std {
262262
}
263263

264264
#[cfg(feature = "iovec")]
265-
fn poll_vectored_read(mut self: Pin<&mut Self>, cx: &mut Context<'_>, vec: &mut [IoVecMut<'_>])
265+
fn poll_read_vectored(mut self: Pin<&mut Self>, cx: &mut Context<'_>, vec: &mut [IoVecMut<'_>])
266266
-> Poll<Result<usize>>
267267
{
268-
Pin::new(&mut **self).poll_vectored_read(cx, vec)
268+
Pin::new(&mut **self).poll_read_vectored(cx, vec)
269269
}
270270
}
271271
}
@@ -290,10 +290,10 @@ mod if_std {
290290
}
291291

292292
#[cfg(feature = "iovec")]
293-
fn poll_vectored_read(mut self: Pin<&mut Self>, cx: &mut Context<'_>, vec: &mut [IoVecMut<'_>])
293+
fn poll_read_vectored(mut self: Pin<&mut Self>, cx: &mut Context<'_>, vec: &mut [IoVecMut<'_>])
294294
-> Poll<Result<usize>>
295295
{
296-
T::poll_vectored_read((*self).as_mut(), cx, vec)
296+
T::poll_read_vectored((*self).as_mut(), cx, vec)
297297
}
298298
}
299299

@@ -312,7 +312,7 @@ mod if_std {
312312
}
313313

314314
#[cfg(feature = "iovec")]
315-
fn poll_vectored_read(mut self: Pin<&mut Self>, _: &mut Context<'_>, vec: &mut [IoVecMut<'_>])
315+
fn poll_read_vectored(mut self: Pin<&mut Self>, _: &mut Context<'_>, vec: &mut [IoVecMut<'_>])
316316
-> Poll<Result<usize>>
317317
{
318318
Poll::Ready(StdIo::Read::read_vectored(&mut *self, vec))
@@ -341,10 +341,10 @@ mod if_std {
341341
}
342342

343343
#[cfg(feature = "iovec")]
344-
fn poll_vectored_write(mut self: Pin<&mut Self>, cx: &mut Context<'_>, vec: &[IoVec<'_>])
344+
fn poll_write_vectored(mut self: Pin<&mut Self>, cx: &mut Context<'_>, vec: &[IoVec<'_>])
345345
-> Poll<Result<usize>>
346346
{
347-
Pin::new(&mut **self).poll_vectored_write(cx, vec)
347+
Pin::new(&mut **self).poll_write_vectored(cx, vec)
348348
}
349349

350350
fn poll_flush(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<()>> {
@@ -373,10 +373,10 @@ mod if_std {
373373
}
374374

375375
#[cfg(feature = "iovec")]
376-
fn poll_vectored_write(mut self: Pin<&mut Self>, cx: &mut Context<'_>, vec: &[IoVec<'_>])
376+
fn poll_write_vectored(mut self: Pin<&mut Self>, cx: &mut Context<'_>, vec: &[IoVec<'_>])
377377
-> Poll<Result<usize>>
378378
{
379-
T::poll_vectored_write((*self).as_mut(), cx, vec)
379+
T::poll_write_vectored((*self).as_mut(), cx, vec)
380380
}
381381

382382
fn poll_flush(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<()>> {
@@ -397,7 +397,7 @@ mod if_std {
397397
}
398398

399399
#[cfg(feature = "iovec")]
400-
fn poll_vectored_write(mut self: Pin<&mut Self>, _: &mut Context<'_>, vec: &[IoVec<'_>])
400+
fn poll_write_vectored(mut self: Pin<&mut Self>, _: &mut Context<'_>, vec: &[IoVec<'_>])
401401
-> Poll<Result<usize>>
402402
{
403403
Poll::Ready(StdIo::Write::write_vectored(&mut *self, vec))
@@ -432,7 +432,7 @@ mod if_std {
432432
}
433433

434434
#[cfg(feature = "iovec")]
435-
fn poll_vectored_write(self: Pin<&mut Self>, _: &mut Context<'_>, vec: &[IoVec<'_>])
435+
fn poll_write_vectored(self: Pin<&mut Self>, _: &mut Context<'_>, vec: &[IoVec<'_>])
436436
-> Poll<Result<usize>>
437437
{
438438
Poll::Ready(StdIo::Write::write_vectored(&mut self.get_mut().get_mut().as_mut(), vec))

futures-util/src/io/split.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,10 @@ impl<R: AsyncRead> AsyncRead for ReadHalf<R> {
4646
}
4747

4848
#[cfg(feature = "iovec")]
49-
fn poll_vectored_read(self: Pin<&mut Self>, cx: &mut Context<'_>, vec: &mut [IoVecMut<'_>])
49+
fn poll_read_vectored(self: Pin<&mut Self>, cx: &mut Context<'_>, vec: &mut [IoVecMut<'_>])
5050
-> Poll<io::Result<usize>>
5151
{
52-
lock_and_then(&self.handle, cx, |l, cx| l.poll_vectored_read(cx, vec))
52+
lock_and_then(&self.handle, cx, |l, cx| l.poll_read_vectored(cx, vec))
5353
}
5454
}
5555

@@ -61,10 +61,10 @@ impl<W: AsyncWrite> AsyncWrite for WriteHalf<W> {
6161
}
6262

6363
#[cfg(feature = "iovec")]
64-
fn poll_vectored_write(self: Pin<&mut Self>, cx: &mut Context<'_>, vec: &[IoVec<'_>])
64+
fn poll_write_vectored(self: Pin<&mut Self>, cx: &mut Context<'_>, vec: &[IoVec<'_>])
6565
-> Poll<io::Result<usize>>
6666
{
67-
lock_and_then(&self.handle, cx, |l, cx| l.poll_vectored_write(cx, vec))
67+
lock_and_then(&self.handle, cx, |l, cx| l.poll_write_vectored(cx, vec))
6868
}
6969

7070
fn poll_flush(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<io::Result<()>> {

0 commit comments

Comments
 (0)