Skip to content

Commit

Permalink
feat(aionbot): optimize method export (#28)
Browse files Browse the repository at this point in the history
* feat(aionbot): optimize method export

* fix(test): fix macro import
  • Loading branch information
fu050409 authored Oct 28, 2024
1 parent 105753d commit 7ea0392
Show file tree
Hide file tree
Showing 7 changed files with 119 additions and 105 deletions.
6 changes: 6 additions & 0 deletions .changes/optimze-export.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"aionbot": patch:feat
"aionbot-macros": patch:feat
---

Optimize method export in `aionbot` crate.
121 changes: 61 additions & 60 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions crates/aionbot-macros/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ quote = "1.0.37"
syn = { version = "2.0.77", features = ["full"] }

[dev-dependencies]
aionbot.workspace = true
aionbot-core.workspace = true

[lib]
Expand Down
2 changes: 1 addition & 1 deletion crates/aionbot-macros/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ pub fn register(attr: TokenStream, item: TokenStream) -> TokenStream {
let expanded = quote! {
use std::sync::*;
use std::cell::*;
use aionbot_core::prelude::*;
use aionbot::prelude::*;

pub fn #fn_name_ident(#fn_args) -> HandlerCallback {
Box::pin(async move { #fn_body })
Expand Down
Loading

0 comments on commit 7ea0392

Please sign in to comment.