From c28a60c5004a546757db095e197c509497ae961f Mon Sep 17 00:00:00 2001 From: sgoudham Date: Fri, 29 Apr 2022 04:45:46 +0100 Subject: [PATCH] Remove use of 'dyn' to improve efficiency --- src/bin/mdbook-template.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bin/mdbook-template.rs b/src/bin/mdbook-template.rs index 48314ac..a9776f4 100644 --- a/src/bin/mdbook-template.rs +++ b/src/bin/mdbook-template.rs @@ -30,7 +30,7 @@ pub fn make_app() -> Command<'static> { ) } -fn handle_preprocessing(pre: &dyn Preprocessor) -> Result<(), Error> { +fn handle_preprocessing(pre: &Template) -> Result<(), Error> { let (ctx, book) = CmdPreprocessor::parse_input(io::stdin())?; let book_version = Version::parse(&ctx.mdbook_version)?; @@ -52,7 +52,7 @@ fn handle_preprocessing(pre: &dyn Preprocessor) -> Result<(), Error> { Ok(()) } -fn handle_supports(pre: &dyn Preprocessor, sub_args: &ArgMatches) -> ! { +fn handle_supports(pre: &Template, sub_args: &ArgMatches) -> ! { let renderer = sub_args.value_of("renderer").expect("Required argument"); let supported = pre.supports_renderer(renderer);