From 21c4f95fd922d1d1b37eddec1a595e7233b8da4c Mon Sep 17 00:00:00 2001 From: "Dustin J. Mitchell" Date: Sat, 5 Jun 2021 09:03:59 -0400 Subject: [PATCH] fix clippy --- cli/src/bin/usage-docs.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli/src/bin/usage-docs.rs b/cli/src/bin/usage-docs.rs index baa4079e1..cf3998b5b 100644 --- a/cli/src/bin/usage-docs.rs +++ b/cli/src/bin/usage-docs.rs @@ -43,7 +43,7 @@ fn process(_ctx: &PreprocessorContext, mut book: Book) -> Result { chapter .source_path .as_ref() - .unwrap_or(chapter.path.as_ref().unwrap()) + .unwrap_or_else(|| chapter.path.as_ref().unwrap()) ); } chapter.content = new_content;