Standardize the construction of intermediate BlogPostPage.
This commit is contained in:
@@ -23,14 +23,12 @@ pub(crate) use inoop;
|
||||
///
|
||||
/// This exists to make changing the type signature easier.
|
||||
macro_rules! intermediate {
|
||||
($istruct:ident, $pstruct:ident, $original:ident, $registry:ident, $fnbody:tt) => {
|
||||
($istruct:ident, $pstruct:ty, $original:ident, $registry:ident, $fnbody:tt) => {
|
||||
impl $istruct {
|
||||
pub(crate) async fn new<'orig, 'parse>(
|
||||
registry: crate::intermediate::RefRegistry<'orig, 'parse>,
|
||||
original: &'orig organic::types::$pstruct<'parse>,
|
||||
$registry: crate::intermediate::RefRegistry<'orig, 'parse>,
|
||||
$original: $pstruct,
|
||||
) -> Result<$istruct, CustomError> {
|
||||
let $original = original;
|
||||
let $registry = registry;
|
||||
$fnbody
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user