Skip to content

Commit c6799df

Browse files
committed
Nit for doc & Operation::new
1 parent b20d344 commit c6799df

1 file changed

Lines changed: 3 additions & 8 deletions

File tree

src/driver/mod.rs

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -145,12 +145,7 @@ pub struct Operation<'a> {
145145

146146
impl<'a> Operation<'a> {
147147
/// Create [`Operation`].
148-
pub fn new(op: &'a mut impl OpCode, user_data: usize) -> Self {
149-
Self { op, user_data }
150-
}
151-
152-
/// Create [`Operation`] from dyn [`OpCode`].
153-
pub fn new_dyn(op: &'a mut dyn OpCode, user_data: usize) -> Self {
148+
pub fn new(op: &'a mut dyn OpCode, user_data: usize) -> Self {
154149
Self { op, user_data }
155150
}
156151

@@ -173,7 +168,7 @@ impl<'a, O: OpCode> From<(&'a mut O, usize)> for Operation<'a> {
173168

174169
impl<'a> From<(&'a mut dyn OpCode, usize)> for Operation<'a> {
175170
fn from((op, user_data): (&'a mut dyn OpCode, usize)) -> Self {
176-
Self::new_dyn(op, user_data)
171+
Self::new(op, user_data)
177172
}
178173
}
179174

@@ -189,7 +184,7 @@ impl Entry {
189184
Self { user_data, result }
190185
}
191186

192-
/// The user-defined data passed to [`Poller::push`].
187+
/// The user-defined data passed to [`Operation`].
193188
pub fn user_data(&self) -> usize {
194189
self.user_data
195190
}

0 commit comments

Comments
 (0)