Skip to content

Commit f6aa0ef

Browse files
committed
feat: v1.13.12
1 parent 50147c7 commit f6aa0ef

File tree

4 files changed

+17
-4
lines changed

4 files changed

+17
-4
lines changed

Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "lombok-macros"
3-
version = "1.13.11"
3+
version = "1.13.12"
44
readme = "README.md"
55
edition = "2024"
66
authors = ["root@ltpp.vip"]
@@ -18,9 +18,9 @@ exclude = [
1818
]
1919

2020
[dependencies]
21-
proc-macro2 = "1.0.95"
22-
quote = "1.0.40"
23-
syn = "2.0.104"
21+
proc-macro2 = "1.0.101"
22+
quote = "1.0.41"
23+
syn = "2.0.106"
2424

2525
[lib]
2626
proc-macro = true

src/func/impl.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ impl FuncType {
4141
///
4242
/// # Returns
4343
/// - `true` if the `FuncType` is `Get`; otherwise, `false`.
44+
#[inline]
4445
pub fn is_get(&self) -> bool {
4546
*self == FuncType::Get
4647
}
@@ -52,6 +53,7 @@ impl FuncType {
5253
///
5354
/// # Returns
5455
/// - `true` if the `FuncType` is `GetMut`; otherwise, `false`.
56+
#[inline]
5557
pub fn is_get_mut(&self) -> bool {
5658
*self == FuncType::GetMut
5759
}
@@ -63,6 +65,7 @@ impl FuncType {
6365
///
6466
/// # Returns
6567
/// - `true` if the `FuncType` is `Set`; otherwise, `false`.
68+
#[inline]
6669
pub fn is_set(&self) -> bool {
6770
*self == FuncType::Set
6871
}
@@ -74,6 +77,7 @@ impl FuncType {
7477
///
7578
/// # Returns
7679
/// - `true` if the `FuncType` is `Debug`; otherwise, `false`.
80+
#[inline]
7781
pub fn is_debug(&self) -> bool {
7882
*self == FuncType::Debug
7983
}
@@ -85,6 +89,7 @@ impl FuncType {
8589
///
8690
/// # Returns
8791
/// - `true` if the `FuncType` is `Unknown`; otherwise, `false`.
92+
#[inline]
8893
pub fn is_unknown(&self) -> bool {
8994
*self == Self::Unknown
9095
}
@@ -96,6 +101,7 @@ impl FuncType {
96101
///
97102
/// # Returns
98103
/// - `true` if the `FuncType` parsed from the string is not `Unknown`; otherwise, `false`.
104+
#[inline]
99105
pub fn is_known(func_type_str: &str) -> bool {
100106
let func_type: FuncType = func_type_str.parse::<FuncType>().unwrap_or_default();
101107
func_type != Self::Unknown

src/generate/fn.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ fn generate_named_getter_setter(
8484
let get_quote = |vis: TokenStream2| {
8585
if need_getter {
8686
quote! {
87+
#[inline]
8788
#vis fn #get_name(&self) -> &#attr_ty {
8889
&self.#attr_name_ident
8990
}
@@ -95,6 +96,7 @@ fn generate_named_getter_setter(
9596
let get_mut_quote = |vis: TokenStream2| {
9697
if need_getter_mut {
9798
quote! {
99+
#[inline]
98100
#vis fn #get_mut_name(&mut self) -> &mut #attr_ty {
99101
&mut self.#attr_name_ident
100102
}
@@ -106,6 +108,7 @@ fn generate_named_getter_setter(
106108
let set_quote = |vis: TokenStream2| {
107109
if need_setter {
108110
quote! {
111+
#[inline]
109112
#vis fn #set_name(&mut self, val: #attr_ty) -> &mut Self {
110113
self.#attr_name_ident = val;
111114
self
@@ -198,6 +201,7 @@ fn generate_tuple_getter_setter(
198201
let get_quote = |vis: TokenStream2| {
199202
if need_getter {
200203
quote! {
204+
#[inline]
201205
#vis fn #get_name(&self) -> &#attr_ty {
202206
&self.#field_index
203207
}
@@ -209,6 +213,7 @@ fn generate_tuple_getter_setter(
209213
let get_mut_quote = |vis: TokenStream2| {
210214
if need_getter_mut {
211215
quote! {
216+
#[inline]
212217
#vis fn #get_mut_name(&mut self) -> &mut #attr_ty {
213218
&mut self.#field_index
214219
}
@@ -220,6 +225,7 @@ fn generate_tuple_getter_setter(
220225
let set_quote = |vis: TokenStream2| {
221226
if need_setter {
222227
quote! {
228+
#[inline]
223229
#vis fn #set_name(&mut self, val: #attr_ty) -> &mut Self {
224230
self.#field_index = val;
225231
self

src/visibility/impl.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ impl Visibility {
2424
///
2525
/// # Returns
2626
/// - `true` if the visibility is `Public`; otherwise, `false`.
27+
#[inline]
2728
pub fn is_public(&self) -> bool {
2829
*self == Self::Public
2930
}

0 commit comments

Comments
 (0)