Skip to content

Commit a37dd46

Browse files
committed
refactor: make methods name clearer
1 parent 982eb48 commit a37dd46

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

compio-driver/src/lib.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,10 @@ impl Proactor {
305305
/// # Panics
306306
/// This function will panic if the requested operation has not been
307307
/// completed.
308-
pub fn pop_flags<T>(&mut self, op: Key<T>) -> PushEntry<Key<T>, (BufResult<usize, T>, u32)> {
308+
pub fn pop_with_flags<T>(
309+
&mut self,
310+
op: Key<T>,
311+
) -> PushEntry<Key<T>, (BufResult<usize, T>, u32)> {
309312
instrument!(compio_log::Level::DEBUG, "pop_flags", ?op);
310313
if op.has_result() {
311314
let flags = op.flags();

compio-runtime/src/runtime/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ impl Runtime {
250250
/// the flags
251251
///
252252
/// You only need this when authoring your own [`OpCode`].
253-
pub fn submit_flags<T: OpCode + 'static>(
253+
pub fn submit_with_flags<T: OpCode + 'static>(
254254
&self,
255255
op: T,
256256
) -> impl Future<Output = (BufResult<usize, T>, u32)> {
@@ -296,14 +296,14 @@ impl Runtime {
296296
})
297297
}
298298

299-
pub(crate) fn poll_task_flags<T: OpCode>(
299+
pub(crate) fn poll_task_with_flags<T: OpCode>(
300300
&self,
301301
cx: &mut Context,
302302
op: Key<T>,
303303
) -> PushEntry<Key<T>, (BufResult<usize, T>, u32)> {
304304
instrument!(compio_log::Level::DEBUG, "poll_task_flags", ?op);
305305
let mut driver = self.driver.borrow_mut();
306-
driver.pop_flags(op).map_pending(|mut k| {
306+
driver.pop_with_flags(op).map_pending(|mut k| {
307307
driver.update_waker(&mut k, cx.waker().clone());
308308
k
309309
})

compio-runtime/src/runtime/op.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ impl<T: OpCode> Future for OpFlagsFuture<T> {
5858
type Output = (BufResult<usize, T>, u32);
5959

6060
fn poll(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output> {
61-
let res = Runtime::with_current(|r| r.poll_task_flags(cx, self.key.take().unwrap()));
61+
let res = Runtime::with_current(|r| r.poll_task_with_flags(cx, self.key.take().unwrap()));
6262
match res {
6363
PushEntry::Pending(key) => {
6464
self.key = Some(key);

0 commit comments

Comments
 (0)