Skip to content

Commit

Permalink
Merge pull request #3995 from ehuss/elided_lifetimes_in_paths
Browse files Browse the repository at this point in the history
mdbook-trpl-listing: Add missing elided lifetimes
  • Loading branch information
chriskrycho authored Jul 31, 2024
2 parents 506a35a + d179c23 commit 04bc139
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/mdbook-trpl-listing/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ fn rewrite_listing(src: &str, mode: Mode) -> Result<String, String> {
}
ev => state.events.push(Ok(ev)),
};
Ok::<ListingState, String>(state)
Ok::<ListingState<'_>, String>(state)
},
)?;

Expand Down Expand Up @@ -190,7 +190,7 @@ struct ListingState<'e> {
impl<'e> ListingState<'e> {
fn open_listing(
&mut self,
tag: pulldown_cmark::CowStr,
tag: pulldown_cmark::CowStr<'_>,
mode: Mode,
) -> Result<(), String> {
// We do not *keep* the version constructed here, just temporarily
Expand Down Expand Up @@ -247,7 +247,7 @@ impl<'e> ListingState<'e> {
Ok(())
}

fn close_listing(&mut self, tag: pulldown_cmark::CowStr, mode: Mode) {
fn close_listing(&mut self, tag: pulldown_cmark::CowStr<'_>, mode: Mode) {
let trailing = if !tag.ends_with('>') {
tag.replace("</Listing>", "")
} else {
Expand Down

0 comments on commit 04bc139

Please sign in to comment.