Skip to content

Commit

Permalink
fix clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon-Laux committed Oct 31, 2023
1 parent 2fa3152 commit 524b955
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/parser/link_url.rs
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ enum UrlInfo<'a> {
},
}

#[derive(Debug, PartialEq)]
#[derive(Debug, PartialEq, Eq)]
pub enum LinkParseError<I> {
Nom(I, ErrorKind),
ThisIsNotPercentEncoding,
Expand All @@ -188,7 +188,7 @@ fn is_reserved(char: char) -> bool {
}

fn is_hex_digit(c: char) -> bool {
c.is_digit(16)
c.is_ascii_digit()
}

fn escaped_char(input: &str) -> IResult<&str, &str, LinkParseError<&str>> {
Expand Down
2 changes: 1 addition & 1 deletion src/parser/parse_from_text/base_parsers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use nom::{
IResult,
};

#[derive(Debug, PartialEq)]
#[derive(Debug, PartialEq, Eq)]
pub enum CustomError<I> {
NoContent,
InvalidWhiteSpaceFound,
Expand Down
2 changes: 1 addition & 1 deletion src/parser/parse_from_text/markdown_elements.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ fn code_block(input: &str) -> IResult<&str, Element, CustomError<&str>> {
Element::CodeBlock {
language: lang,
content: content
.get(0..content.bytes().count().saturating_sub(offset))
.get(0..content.len().saturating_sub(offset))
.into_result()?,
},
))
Expand Down

0 comments on commit 524b955

Please sign in to comment.