Build index when creating a module.

This commit is contained in:
Stephen Chung
2020-11-21 22:18:32 +08:00
parent 254fd16e62
commit e5c9ca23b5
7 changed files with 54 additions and 25 deletions

View File

@@ -131,6 +131,7 @@ macro_rules! def_package {
pub fn new() -> Self {
let mut module = $root::Module::new_with_capacity(1024);
<Self as $root::packages::Package>::init(&mut module);
module.build_index();
Self(module.into())
}
}