Skip to content

Commit

Permalink
fix clippy errors due to update to needless_lifetimes at Rust 1.83
Browse files Browse the repository at this point in the history
  • Loading branch information
rhysd committed Dec 5, 2024
1 parent ec514bf commit 218eed2
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion v2/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ mod tests {
}
}

impl<'a> Drop for Env<'a> {
impl Drop for Env<'_> {
fn drop(&mut self) {
let Self((name, saved)) = &self;
if let Some(saved) = saved {
Expand Down
4 changes: 2 additions & 2 deletions v2/src/markdown/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ impl<'input, V: TextVisitor, T: TextTokenizer> MarkdownParser<'input, V, T> {

// Note: Build raw JavaScript expression which is evaluated to the render tree encoded as JSON value.
// This expression will be evaluated via `receive(JSON.parse('{"kind":"render_tree",...}'))` by renderer.
impl<'input, V: TextVisitor, T: TextTokenizer> RawMessageWriter for MarkdownParser<'input, V, T> {
impl<V: TextVisitor, T: TextTokenizer> RawMessageWriter for MarkdownParser<'_, V, T> {
type Output = V;

fn write_to(self, writer: impl Write) -> Result<Self::Output> {
Expand Down Expand Up @@ -289,7 +289,7 @@ where
}
}

impl<'events, 'input, I> Read for InlineHtmlReader<'events, 'input, I>
impl<'input, I> Read for InlineHtmlReader<'_, 'input, I>
where
I: Iterator<Item = (Event<'input>, Range)>,
{
Expand Down
6 changes: 3 additions & 3 deletions v2/src/markdown/search.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ impl MatchPosition for AhoCorasickMatch {
}
}

impl<'text> MatchPosition for RegexMatch<'text> {
impl MatchPosition for RegexMatch<'_> {
fn start(&self) -> usize {
self.start()
}
Expand Down Expand Up @@ -194,7 +194,7 @@ pub struct MatchTokenizer<'a> {
index: Option<usize>,
}

impl<'a> MatchTokenizer<'a> {
impl MatchTokenizer<'_> {
fn next(&mut self) -> bool {
let Some((h, t)) = self.tail.split_first() else {
return false;
Expand Down Expand Up @@ -225,7 +225,7 @@ impl<'a> MatchTokenizer<'a> {
}
}

impl<'a> TextTokenizer for MatchTokenizer<'a> {
impl TextTokenizer for MatchTokenizer<'_> {
fn tokenize<'t>(&mut self, text: &'t str, range: &Range) -> (TokenKind, &'t str) {
debug_assert_eq!(text.len(), range.len(), "text={:?} range={:?}", text, range);
let Range { start, end } = *range;
Expand Down
2 changes: 1 addition & 1 deletion v2/src/persistent.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ pub struct RecentFiles<'a> {
pub paths: Vec<&'a Path>,
}

impl<'a> PersistentData for RecentFiles<'a> {
impl PersistentData for RecentFiles<'_> {
const FILE: &'static str = "recent_files.json";
}

Expand Down

0 comments on commit 218eed2

Please sign in to comment.