This commit is contained in:
testuser 2025-02-20 15:18:18 +09:00
parent 34e1528745
commit e62d935829

View file

@ -373,7 +373,9 @@ impl CodeGen for Block {
log::error!("path {}", out_path.display());
log::error!("old {}", old_out.to_string());
log::error!("new {}", out.to_string());
return Err(CodeGenError::FilePathDuplicatedError(snake_case_name.to_string()));
return Err(CodeGenError::FilePathDuplicatedError(
snake_case_name.to_string(),
));
};
let files = self.elements.into_iter().try_fold(files, |files, e| {
@ -465,7 +467,9 @@ impl CodeGen for Register {
let (out_path, _next_parent_path) = mod_file_path(parent_path, &snake_case_name);
log::info!("{:?}", out_path);
if files.insert(out_path, out).is_some() {
return Err(CodeGenError::FilePathDuplicatedError(snake_case_name.to_string()));
return Err(CodeGenError::FilePathDuplicatedError(
snake_case_name.to_string(),
));
}
Ok(files)
}