Skip to content

Commit

Permalink
Clippy 1.84.0 (#178)
Browse files Browse the repository at this point in the history
  • Loading branch information
tirix authored Jan 13, 2025
1 parent 9074259 commit 9043997
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion metamath-rs/src/comment_parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ impl<'a> CommentParser<'a> {
&& self
.buf
.get(self.pos + 1)
.map_or(false, |c| CLOSING_PUNCTUATION.contains(c))
.is_some_and(|c| CLOSING_PUNCTUATION.contains(c))
}
}

Expand Down
4 changes: 2 additions & 2 deletions metamath-rs/src/verify_markup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -392,13 +392,13 @@ fn verify_markup_comment(
fn ensure_space_before(buf: &[u8], i: usize, diag: &mut impl FnMut(Diagnostic)) {
if i.checked_sub(1)
.map(|j| buf[j])
.map_or(false, |c| !c.is_ascii_whitespace())
.is_some_and(|c| !c.is_ascii_whitespace())
{
diag(Diagnostic::MarkupNeedsWhitespace(i as u32))
}
}
fn ensure_space_after(buf: &[u8], i: usize, diag: &mut impl FnMut(Diagnostic)) {
if buf.get(i + 1).map_or(false, |c| !c.is_ascii_whitespace()) {
if buf.get(i + 1).is_some_and(|c| !c.is_ascii_whitespace()) {
diag(Diagnostic::MarkupNeedsWhitespace(i as u32))
}
}
Expand Down

0 comments on commit 9043997

Please sign in to comment.