Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
minor change
  • Loading branch information
sunny-g authored and filmor committed Feb 13, 2024
commit 36f0a784c811e45d9bf80ed4a3e5fcd477f06c88
7 changes: 4 additions & 3 deletions rustler/src/schedule.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ pub enum SchedulerFlags {
}

impl SchedulerFlags {
#[inline]
fn from(n: isize) -> Self {
match n {
_ if n == Self::Normal as isize => Self::Normal,
Expand Down Expand Up @@ -82,7 +83,7 @@ macro_rules! impl_funcs {
#[allow(clippy::many_single_char_names)]
#[inline]
fn from(($($arg),*): ($($ty),*)) -> Self {
Self::$variant(PhantomData, $($arg),*)
Self::$func_name($($arg),*)
}
}
};
Expand All @@ -91,14 +92,14 @@ macro_rules! impl_funcs {
impl<N: crate::Nif, T, A, B, C, D, E, F, G> Schedule<N, T, A, B, C, D, E, F, G> {
#[inline]
pub fn next(a: A) -> Self {
Self::from(a)
Self::Next(PhantomData, a)
}
}

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> {
#[inline]
fn from(a: A) -> Self {
Self::Next(PhantomData, a)
Self::next(a)
}
}
impl_funcs! { Next2 next2(a: A, b: B,) }
Expand Down