fix(generator): top level mod should be mod.rs instead of lib.rs

This commit is contained in:
Wataru Otsubo 2025-04-24 02:07:38 +09:00
parent 8e68c80c06
commit 516cfa9151

View file

@ -176,7 +176,7 @@ This code is auto generated using endcap_sl_software_ri_generator.
.map(|(path, tokens)| -> Result<(PathBuf, syn::File), _> {
let tokens = if path
.file_name()
.is_some_and(|file| file == "lib.rs")
.is_some_and(|file| file == "mod.rs")
{
quote! {
#![doc = #build_metadata]
@ -234,7 +234,7 @@ impl CodeGen for Module {
pub use super::RegisterInterface;
};
files.insert(PathBuf::from("./lib.rs"), out);
files.insert(PathBuf::from("./mod.rs"), out);
let ident_register_interface = util::parse_to_ident("RegisterInterface").unwrap();
let register_interface_mod = PathBuf::from("./");