Skip to content

Commit 4f2eb8a

Browse files
committed
fix
1 parent d0d49b3 commit 4f2eb8a

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

crates/macros/src/struct_attrs.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ use std::path::PathBuf;
77
pub struct StructAttrs {
88
name: String,
99
rename_all: Option<RenameAll>,
10-
rename: Option<String>,
1110
export: Option<PathBuf>,
1211
}
1312

@@ -16,7 +15,6 @@ impl StructAttrs {
1615
let mut struct_attrs = Self {
1716
name: struct_name,
1817
rename_all: None,
19-
rename: None,
2018
export: None,
2119
};
2220

@@ -41,7 +39,7 @@ impl StructAttrs {
4139
let value = get_nested_value(&meta)
4240
.expect("Failed to parse rename attribute");
4341

44-
struct_attrs.rename = Some(value);
42+
struct_attrs.name = value;
4543
}
4644
"rename_all" => {
4745
let value = get_nested_value(&meta)
@@ -88,7 +86,7 @@ impl StructAttrs {
8886
}
8987

9088
pub fn get_name(&self) -> &String {
91-
self.rename.as_ref().unwrap_or(&self.name)
89+
&self.name
9290
}
9391

9492
pub fn get_export_path(&self) -> PathBuf {

0 commit comments

Comments
 (0)