Skip to content

Commit 216effd

Browse files
committed
auto import tree utils in template
1 parent 6dc3378 commit 216effd

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/main.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,9 @@ fn parse_extra_use(code: &str) -> String {
6464
if code.contains("pub struct ListNode") {
6565
extra_use_line.push_str("\nuse super::util::linked_list::{ListNode, to_list};")
6666
}
67+
if code.contains("pub struct TreeNode") {
68+
extra_use_line.push_str("\nuse super::util::tree::{TreeNode, to_tree};")
69+
}
6770
extra_use_line
6871
}
6972

0 commit comments

Comments
 (0)