Skip to content

Commit

Permalink
[macros] Add missing semicolon in expansion
Browse files Browse the repository at this point in the history
  • Loading branch information
auguwu committed Jun 23, 2024
1 parent 286e782 commit 246e0bf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions crates/macros/src/expand.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,12 @@ pub fn test(body: ItemFn, attrs: Attr) -> TokenStream {
crate::attr::PathOrExpr::Path(path) => quote!(ctx.containers_mut().push({
let container = #path(&ctx).await;
Box::new(container)
})),
});),

crate::attr::PathOrExpr::Callable(callable) => quote!(ctx.containers_mut().push({
let container = #callable;
Box::new(container)
})),
});),
});

let serve = match attrs.router {
Expand Down
4 changes: 2 additions & 2 deletions crates/macros/tests/ui/invalid_container.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ error: expected square brackets
27 | #[charted_testkit_macros::test(containers = 123)]
| ^^^

error: expected a literal string or valid path to a function
error: expected a literal string, valid path to a function, or a function call
--> ./tests/ui/invalid_container.rs:32:46
|
32 | #[charted_testkit_macros::test(containers = [123])]
| ^^^

error: expected a literal string or valid path to a function
error: expected a literal string, valid path to a function, or a function call
--> ./tests/ui/invalid_container.rs:37:46
|
37 | #[charted_testkit_macros::test(containers = [true])]
Expand Down

0 comments on commit 246e0bf

Please sign in to comment.