Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mdbook-trpl-listing: Add missing elided lifetimes #3995

Merged
merged 1 commit into from
Jul 31, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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