Skip to content

Commit

Permalink
Change queue_size argument type to expr
Browse files Browse the repository at this point in the history
  • Loading branch information
petekubiak authored and lulf committed Oct 18, 2024
1 parent aa15f8e commit 2ee7580
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ector/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ macro_rules! actor {
::ector::actor!($spawner, $name, $ty, $instance, $mutex, 1)
}};

($spawner:ident, $name:ident, $ty:ty, $instance:expr, $queue_size:literal) => {{
($spawner:ident, $name:ident, $ty:ty, $instance:expr, $queue_size:expr) => {{
::ector::actor!(
$spawner,
$name,
Expand All @@ -47,7 +47,7 @@ macro_rules! actor {
)
}};

($spawner:ident, $name:ident, $ty:ty, $instance:expr, $mutex:ty, $queue_size:literal) => {{
($spawner:ident, $name:ident, $ty:ty, $instance:expr, $mutex:ty, $queue_size:expr) => {{
static CONTEXT: ::ector::ActorContext<$ty, $mutex, $queue_size> =
::ector::ActorContext::new();
::ector::spawn_context!(
Expand Down Expand Up @@ -81,7 +81,7 @@ macro_rules! spawn_context {
::ector::spawn_context!($context, $spawner, $name, $ty, $instance, $mutex, 1)
}};

($context:ident, $spawner:ident, $name:ident, $ty:ty, $instance:expr, $queue_size:literal) => {{
($context:ident, $spawner:ident, $name:ident, $ty:ty, $instance:expr, $queue_size:expr) => {{
::ector::spawn_context!(
$context,
$spawner,
Expand All @@ -93,7 +93,7 @@ macro_rules! spawn_context {
)
}};

($context:ident, $spawner:ident, $name:ident, $ty:ty, $instance:expr, $mutex:ty, $queue_size:literal) => {{
($context:ident, $spawner:ident, $name:ident, $ty:ty, $instance:expr, $mutex:ty, $queue_size:expr) => {{
#[embassy_executor::task]
async fn $name(a: &'static ::ector::ActorContext<$ty, $mutex, $queue_size>, instance: $ty) {
a.mount(instance).await
Expand Down

0 comments on commit 2ee7580

Please sign in to comment.