Skip to content

Commit 04833dd

Browse files
sunny-gfilmor
authored andcommitted
minor change
1 parent c916899 commit 04833dd

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

rustler/src/schedule.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ pub enum SchedulerFlags {
1212
}
1313

1414
impl SchedulerFlags {
15+
#[inline]
1516
fn from(n: isize) -> Self {
1617
match n {
1718
_ if n == Self::Normal as isize => Self::Normal,
@@ -82,7 +83,7 @@ macro_rules! impl_funcs {
8283
#[allow(clippy::many_single_char_names)]
8384
#[inline]
8485
fn from(($($arg),*): ($($ty),*)) -> Self {
85-
Self::$variant(PhantomData, $($arg),*)
86+
Self::$func_name($($arg),*)
8687
}
8788
}
8889
};
@@ -91,14 +92,14 @@ macro_rules! impl_funcs {
9192
impl<N: crate::Nif, T, A, B, C, D, E, F, G> Schedule<N, T, A, B, C, D, E, F, G> {
9293
#[inline]
9394
pub fn next(a: A) -> Self {
94-
Self::from(a)
95+
Self::Next(PhantomData, a)
9596
}
9697
}
9798

9899
impl<N: crate::Nif, T, A, B, C, D, E, F, G> From<A> for Schedule<N, T, A, B, C, D, E, F, G> {
99100
#[inline]
100101
fn from(a: A) -> Self {
101-
Self::Next(PhantomData, a)
102+
Self::next(a)
102103
}
103104
}
104105
impl_funcs! { Next2 next2(a: A, b: B,) }

0 commit comments

Comments
 (0)