Skip to content

Commit 7c6f497

Browse files
authored
Fix : dependencies not detected when field type is Option<T> (#23)
1 parent 6405ab5 commit 7c6f497

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/core/writers/fs_writer.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,10 @@ impl DbSetsFsWriter {
8484
) -> Vec<String> {
8585
known_types
8686
.iter()
87-
.filter(|&t| content.contains(&format!(": {t}")) && t != struct_or_enum_name) // Check if struct/enum name appears in the content
87+
.filter(|&t| {
88+
(content.contains(&format!(": {t}")) || content.contains(&format!(": Option<{t}>")))
89+
&& t != struct_or_enum_name
90+
}) // Check if struct/enum name appears in the content
8891
.cloned()
8992
.collect()
9093
}

0 commit comments

Comments
 (0)