Skip to content

Commit 4386560

Browse files
committed
feat: v6.1.0
1 parent 982d26e commit 4386560

File tree

19 files changed

+75
-32
lines changed

19 files changed

+75
-32
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "hyperlane-macros"
3-
version = "6.0.3"
3+
version = "6.1.0"
44
readme = "README.md"
55
edition = "2024"
66
authors = ["[email protected]"]

src/aborted/fn.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ use crate::*;
1010
/// # Arguments
1111
///
1212
/// - `TokenStream` - The input `TokenStream` to process.
13+
/// - `Position` - The position to inject the code.
1314
///
1415
/// # Returns
1516
///

src/closed/fn.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ use crate::*;
1010
/// # Arguments
1111
///
1212
/// - `TokenStream` - The input `TokenStream` to process.
13+
/// - `Position` - The position to inject the code.
1314
///
1415
/// # Returns
1516
///

src/common/fn.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,8 @@ fn inject_at_start(
4040
///
4141
/// # Arguments
4242
///
43-
/// - `TokenStream` - The input token stream to process.
44-
/// - `impl FnOnce(&Ident) -> TokenStream2` - Function to generate code inserted after.
45-
///
46-
/// # Returns
47-
///
48-
/// - `TokenStream` - The expanded token stream with inserted code.
43+
/// - `TokenStream` - The input `TokenStream` to process.
44+
/// - `impl FnOnce(&Ident) -> TokenStream2` - A closure that takes a context identifier and returns a `TokenStream` to be inserted at the end of the function.
4945
fn inject_at_end(input: TokenStream, after_fn: impl FnOnce(&Ident) -> TokenStream2) -> TokenStream {
5046
let input_fn: ItemFn = parse_macro_input!(input as ItemFn);
5147
let vis: &Visibility = &input_fn.vis;

src/filter/fn.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@ use crate::*;
66
///
77
/// # Arguments
88
///
9-
/// - `attr`: A code block that returns a boolean value.
10-
/// - `item`: The function to which the attribute is applied.
9+
/// - `TokenStream` - A code block that returns a boolean value.
10+
/// - `TokenStream` - The function to which the attribute is applied.
11+
/// - `Position` - The position to inject the code.
1112
///
1213
/// # Returns
1314
///

src/flush/fn.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ use crate::*;
55
/// # Arguments
66
///
77
/// - `TokenStream` - The input token stream to process.
8+
/// - `Position` - The position to inject the code.
89
///
910
/// # Returns
1011
///

src/hook/fn.rs

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ use crate::*;
77
///
88
/// # Arguments
99
///
10-
/// - `attr` - The attribute `TokenStream`, which can optionally specify an `order`.
11-
/// - `item` - The input `TokenStream` representing the function to be registered as a hook.
10+
/// - `TokenStream` - The attribute `TokenStream`, which can optionally specify an `order`.
11+
/// - `TokenStream` - The input `TokenStream` representing the function to be registered as a hook.
1212
///
1313
/// # Note
1414
///
@@ -48,8 +48,8 @@ inventory::submit! {
4848
///
4949
/// # Arguments
5050
///
51-
/// - `attr` - The attribute `TokenStream`, which can optionally specify an `order`.
52-
/// - `item` - The input `TokenStream` representing the function to be registered as a hook.
51+
/// - `TokenStream` - The attribute `TokenStream`, which can optionally specify an `order`.
52+
/// - `TokenStream` - The input `TokenStream` representing the function to be registered as a hook.
5353
///
5454
/// # Note
5555
///
@@ -89,8 +89,8 @@ inventory::submit! {
8989
///
9090
/// # Arguments
9191
///
92-
/// - `attr` - The attribute `TokenStream`, which can optionally specify an `order`.
93-
/// - `item` - The input `TokenStream` representing the function to be registered as a hook.
92+
/// - `TokenStream` - The attribute `TokenStream`, which can optionally specify an `order`.
93+
/// - `TokenStream` - The input `TokenStream` representing the function to be registered as a hook.
9494
///
9595
/// # Note
9696
///
@@ -130,8 +130,8 @@ inventory::submit! {
130130
///
131131
/// # Arguments
132132
///
133-
/// - `attr` - The attribute `TokenStream`, containing the path to disable the hook for and an optional order.
134-
/// - `item` - The input `TokenStream` representing the function to be registered.
133+
/// - `TokenStream` - The attribute `TokenStream`, containing the path to disable the hook for and an optional order.
134+
/// - `TokenStream` - The input `TokenStream` representing the function to be registered.
135135
///
136136
/// # Returns
137137
///
@@ -167,8 +167,8 @@ inventory::submit! {
167167
///
168168
/// # Arguments
169169
///
170-
/// - `attr` - The attribute `TokenStream`, containing the path to disable the hook for and an optional order.
171-
/// - `item` - The input `TokenStream` representing the function to be registered.
170+
/// - `TokenStream` - The attribute `TokenStream`, containing the path to disable the hook for and an optional order.
171+
/// - `TokenStream` - The input `TokenStream` representing the function to be registered.
172172
///
173173
/// # Returns
174174
///
@@ -201,8 +201,9 @@ inventory::submit! {
201201
///
202202
/// # Arguments
203203
///
204-
/// - `attr` - The attribute token stream.
205-
/// - `item` - The input token stream to process.
204+
/// - `TokenStream` - The attribute token stream.
205+
/// - `TokenStream` - The input token stream to process.
206+
/// - `Position` - The position to inject the code.
206207
///
207208
/// # Returns
208209
///
@@ -231,8 +232,9 @@ inventory::submit! {
231232
///
232233
/// # Arguments
233234
///
234-
/// - `attr` - The attribute token stream.
235-
/// - `item` - The input token stream to process.
235+
/// - `TokenStream` - The attribute token stream.
236+
/// - `TokenStream` - The input token stream to process.
237+
/// - `Position` - The position to inject the code.
236238
///
237239
/// # Returns
238240
///

src/host/fn.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ use crate::*;
66
///
77
/// - `TokenStream` - The attribute token stream.
88
/// - `TokenStream` - The input token stream to process.
9+
/// - `Position` - The position to inject the code.
910
///
1011
/// # Returns
1112
///
@@ -36,6 +37,7 @@ inventory::submit! {
3637
///
3738
/// - `TokenStream` - The attribute token stream.
3839
/// - `TokenStream` - The input token stream to process.
40+
/// - `Position` - The position to inject the code.
3941
///
4042
/// # Returns
4143
///

src/http/fn.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,9 @@ pub(crate) fn create_method_check(
8989
///
9090
/// # Arguments
9191
///
92-
/// - `attr` - The attribute `TokenStream` containing the list of allowed HTTP methods.
93-
/// - `item` - The input `TokenStream` representing the handler function.
94-
/// - `position` - The position at which to inject the method check code.
92+
/// - `TokenStream` - The attribute `TokenStream` containing the list of allowed HTTP methods.
93+
/// - `TokenStream` - The input `TokenStream` representing the handler function.
94+
/// - `Position` - The position at which to inject the method check code.
9595
///
9696
/// # Returns
9797
///

src/hyperlane/fn.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ use crate::*;
66
///
77
/// # Arguments
88
///
9-
/// - `TokenStream`: The attribute token stream, containing the variable and type name.
10-
/// - `TokenStream`: The input token stream to process, typically an `async fn`.
9+
/// - `TokenStream` - The attribute token stream, containing the variable and type name.
10+
/// - `TokenStream` - The input token stream to process, typically an `async fn`.
1111
///
1212
/// # Returns
1313
///

0 commit comments

Comments
 (0)