From 91e3aa4b556f8898dfca9efdeab88f2f8760e435 Mon Sep 17 00:00:00 2001 From: mark Date: Fri, 20 Mar 2020 21:40:40 -0500 Subject: [PATCH] try to satisfy msrv? --- src/book/summary.rs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/book/summary.rs b/src/book/summary.rs index a9ef7ee7..fb1dece0 100644 --- a/src/book/summary.rs +++ b/src/book/summary.rs @@ -374,10 +374,12 @@ impl<'a> SummaryParser<'a> { loop { match self.next_event() { - Some(ev @ Event::Start(Tag::Paragraph)) if !first => { - // we're starting the suffix chapters - self.back(ev); - break; + Some(ev @ Event::Start(Tag::Paragraph)) => { + if !first { + // we're starting the suffix chapters + self.back(ev); + break; + } } // The expectation is that pulldown cmark will terminate a paragraph before a new // heading, so we can always count on this to return without skipping headings.