Switch over to using the render context in render calls.

This commit is contained in:
Tom Alexander
2023-12-19 15:42:37 -05:00
parent cb3278aba5
commit add267d616
67 changed files with 699 additions and 1197 deletions

View File

@@ -2,18 +2,14 @@
///
/// This exists to make changing the type signature easier.
macro_rules! render {
($rstruct:ident, $istruct:ident, $original:ident, $config:ident, $output_directory:ident, $output_file:ident, $fnbody:tt) => {
($rstruct:ident, $istruct:ident, $original:ident, $render_context:ident, $fnbody:tt) => {
impl $rstruct {
pub(crate) fn new(
config: &Config,
output_directory: &Path,
output_file: &Path,
render_context: RenderContext<'_>,
original: &$istruct,
) -> Result<$rstruct, CustomError> {
let $original = original;
let $config = config;
let $output_directory = output_directory;
let $output_file = output_file;
let $render_context = render_context;
$fnbody
}
}
@@ -29,9 +25,7 @@ macro_rules! rnoop {
($rstruct:ident, $istruct:ident) => {
impl $rstruct {
pub(crate) fn new(
_config: &Config,
_output_directory: &Path,
_output_file: &Path,
_render_context: RenderContext<'_>,
_original: &$istruct,
) -> Result<$rstruct, CustomError> {
Ok($rstruct {})