@@ -51,6 +51,7 @@ pub(crate) enum SectionData<'a> {
5151 lad_type : & ' a LadType ,
5252 } ,
5353 FunctionDetail {
54+ types_directory : PathBuf ,
5455 function : & ' a LadFunction ,
5556 } ,
5657}
@@ -214,7 +215,10 @@ impl<'a> Section<'a> {
214215 Section :: new (
215216 child_parent_path. clone ( ) ,
216217 self . ladfile ,
217- SectionData :: FunctionDetail { function } ,
218+ SectionData :: FunctionDetail {
219+ function,
220+ types_directory : PathBuf :: from ( "../types" ) ,
221+ } ,
218222 )
219223 } )
220224 . collect ( )
@@ -230,7 +234,10 @@ impl<'a> Section<'a> {
230234 Some ( Section :: new (
231235 child_parent_path. clone ( ) ,
232236 self . ladfile ,
233- SectionData :: FunctionDetail { function } ,
237+ SectionData :: FunctionDetail {
238+ function,
239+ types_directory : PathBuf :: from ( "../../types" ) ,
240+ } ,
234241 ) )
235242 } )
236243 . collect ( ) ,
@@ -350,12 +357,14 @@ impl<'a> Section<'a> {
350357 } ,
351358 ]
352359 }
353- SectionData :: FunctionDetail { function } => {
354- let types_directory = PathBuf :: from ( "../types" ) ;
360+ SectionData :: FunctionDetail {
361+ function,
362+ ref types_directory,
363+ } => {
355364 vec ! [ SectionItem :: FunctionDetails {
356365 function,
357366 ladfile: self . ladfile,
358- types_directory,
367+ types_directory: types_directory . clone ( ) ,
359368 } ]
360369 }
361370 }
0 commit comments