Skip to content

Commit

Permalink
fixed many issues
Browse files Browse the repository at this point in the history
  • Loading branch information
farooqkz committed Feb 11, 2024
1 parent cf90786 commit ed94a50
Show file tree
Hide file tree
Showing 8 changed files with 127 additions and 75 deletions.
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 @@ -3,7 +3,7 @@ use std::fmt::Debug;
///! Base utility parsers, used by both text and markdown parsers
use nom::{
bytes::complete::tag,
error::{ErrorKind, ParseError},
error::{Error, ErrorKind, ParseError},

Check warning on line 6 in src/parser/parse_from_text/base_parsers.rs

View workflow job for this annotation

GitHub Actions / clippy

unused import: `Error`

warning: unused import: `Error` --> src/parser/parse_from_text/base_parsers.rs:6:13 | 6 | error::{Error, ErrorKind, ParseError}, | ^^^^^ | = note: `#[warn(unused_imports)]` on by default

Check failure on line 6 in src/parser/parse_from_text/base_parsers.rs

View workflow job for this annotation

GitHub Actions / Build and test (ubuntu-latest, 1.64.0)

unused import: `Error`
sequence::delimited,
IResult,
};
Expand Down
3 changes: 3 additions & 0 deletions src/parser/parse_from_text/desktop_subset.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
//! and also we can keep delimited and labled links in desktop
use super::base_parsers::*;

Check warning on line 4 in src/parser/parse_from_text/desktop_subset.rs

View workflow job for this annotation

GitHub Actions / clippy

unused import: `super::base_parsers::*`

warning: unused import: `super::base_parsers::*` --> src/parser/parse_from_text/desktop_subset.rs:4:5 | 4 | use super::base_parsers::*; | ^^^^^^^^^^^^^^^^^^^^^^

Check failure on line 4 in src/parser/parse_from_text/desktop_subset.rs

View workflow job for this annotation

GitHub Actions / Build and test (ubuntu-latest, 1.64.0)

unused import: `super::base_parsers::*`
use super::base_parsers::{
direct_delimited, is_white_space, is_white_space_but_not_linebreak, CustomError,

Check warning on line 6 in src/parser/parse_from_text/desktop_subset.rs

View workflow job for this annotation

GitHub Actions / clippy

unused imports: `direct_delimited`, `is_white_space_but_not_linebreak`, `is_white_space`

warning: unused imports: `direct_delimited`, `is_white_space_but_not_linebreak`, `is_white_space` --> src/parser/parse_from_text/desktop_subset.rs:6:5 | 6 | direct_delimited, is_white_space, is_white_space_but_not_linebreak, CustomError, | ^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Check failure on line 6 in src/parser/parse_from_text/desktop_subset.rs

View workflow job for this annotation

GitHub Actions / Build and test (ubuntu-latest, 1.64.0)

unused imports: `direct_delimited`, `is_white_space_but_not_linebreak`, `is_white_space`
};
use super::markdown_elements::{delimited_email_address, delimited_link, labeled_link};
use super::text_elements::parse_text_element;
use super::Element;
Expand Down
10 changes: 4 additions & 6 deletions src/parser/parse_from_text/find_range.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,19 @@ enum FindRangeResult<'a> {
Range(&'a RangeInclusive<u32>),
}


/// Find a range which `code` might be in it.
///
/// # Description
///
/// # Description
/// This function gets a sorted slice of inclusive u32 ranges, performs
/// binary search on them and returns a FindRangeResult enum telling
/// which range the `code` might be in. It returns `FindRangeResult::WasOnRangeStart`
/// if the code was exactly on start of a range. Or a `FindRangeResult::Range(range)`
/// which indicates `code` is in `range` or in no ranges.
///
///
/// # Arguments
///
/// - `code` the u32 to look for a range for.
///
///
/// - `ranges` a refernce to a slice of `RangeInclusive<u32>`
fn find_range_for_char<'a>(code: u32, ranges: &[RangeInclusive<u32>]) -> FindRangeResult<'a> {
let index = ranges.binary_search_by_key(&code, |range| *range.start());
Expand All @@ -36,7 +35,6 @@ fn find_range_for_char<'a>(code: u32, ranges: &[RangeInclusive<u32>]) -> FindRan
}
}


/// Returns true of `c` is one of the `ranges`, false otherwise.
///
/// # Arguments
Expand Down
2 changes: 1 addition & 1 deletion src/parser/parse_from_text/hashtag_content_char_ranges.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use std::ops::RangeInclusive;
use crate::parser::parse_from_text::find_range::is_in_one_of_ranges;
use std::ops::RangeInclusive;

const NUMBER_OF_RANGES: usize = 850;

Expand Down
171 changes: 109 additions & 62 deletions src/parser/parse_from_text/link_element.rs
Original file line number Diff line number Diff line change
@@ -1,22 +1,24 @@
use crate::parser::link_url::LinkDestination;
use std::ops::RangeInclusive;
use super::base_parsers::*;

Check warning on line 1 in src/parser/parse_from_text/link_element.rs

View workflow job for this annotation

GitHub Actions / clippy

unused import: `super::base_parsers::*`

warning: unused import: `super::base_parsers::*` --> src/parser/parse_from_text/link_element.rs:1:5 | 1 | use super::base_parsers::*; | ^^^^^^^^^^^^^^^^^^^^^^

Check failure on line 1 in src/parser/parse_from_text/link_element.rs

View workflow job for this annotation

GitHub Actions / Build and test (ubuntu-latest, 1.64.0)

unused import: `super::base_parsers::*`
use super::find_range::is_in_one_of_ranges;
use super::Element;
use crate::nom::{Offset, Slice};

Check warning on line 4 in src/parser/parse_from_text/link_element.rs

View workflow job for this annotation

GitHub Actions / clippy

unused imports: `Offset`, `Slice`

warning: unused imports: `Offset`, `Slice` --> src/parser/parse_from_text/link_element.rs:4:18 | 4 | use crate::nom::{Offset, Slice}; | ^^^^^^ ^^^^^

Check failure on line 4 in src/parser/parse_from_text/link_element.rs

View workflow job for this annotation

GitHub Actions / Build and test (ubuntu-latest, 1.64.0)

unused imports: `Offset`, `Slice`
use crate::parser::link_url::LinkDestination;
use nom::{
bytes::{
complete::{tag, take, take_while1, take_while},
branch::alt,
bytes::complete::{tag, take, take_while, take_while1, take_while_m_n},

Check warning on line 8 in src/parser/parse_from_text/link_element.rs

View workflow job for this annotation

GitHub Actions / clippy

unused imports: `peek`, `take`, `verify`

warning: unused imports: `peek`, `take`, `verify` --> src/parser/parse_from_text/link_element.rs:8:28 | 8 | bytes::complete::{tag, take, take_while, take_while1, take_while_m_n}, | ^^^^ ... 13 | combinator::{opt, peek, recognize, verify}, | ^^^^ ^^^^^^

Check failure on line 8 in src/parser/parse_from_text/link_element.rs

View workflow job for this annotation

GitHub Actions / Build and test (ubuntu-latest, 1.64.0)

unused imports: `peek`, `take`, `verify`
character::{
is_alphabetic as is_alpha,
complete::{char, u8}
},
character::{is_alphabetic as is_alpha, char},
combinator::{peek, recognize, verify},
sequence::{tuple, preceded},
multi::{many_m_n, count},
combinator::{opt, peek, recognize, verify},
multi::{count, many0, many_m_n},
sequence::{delimited, preceded, tuple},
AsChar, IResult,
};
use super::base_parsers::*;
use std::ops::RangeInclusive;

// Link syntax here is according to RFC 3986 & 3987 --Farooq


fn is_hex_digit(c: char) -> bool {
c.is_ascii_hexdigit()
}
Expand All @@ -26,7 +28,7 @@ fn is_digit(c: char) -> bool {
}

// These ranges have been extracted from RFC3987, Page 8.
const ucschar_ranges: [RangeInclusive<u32>; 17] = [
const UCSCHAR_RANGES: [RangeInclusive<u32>; 17] = [
0xa0..=0xd7ff,
0xF900..=0xFDCF,
0xFDF0..=0xFFEF,
Expand All @@ -47,7 +49,7 @@ const ucschar_ranges: [RangeInclusive<u32>; 17] = [
];

fn is_ucschar(c: char) -> bool {
is_in_one_of_ranges(c, &ucschar_ranges[..])
is_in_one_of_ranges(c, &UCSCHAR_RANGES[..])
}

fn is_unreserved(c: char) -> bool {
Expand All @@ -67,7 +69,10 @@ fn is_pct_encoded(c: [char; 3]) -> bool {
}

fn is_sub_delim(c: char) -> bool {
matches!(c, '!' | '$' | '&' | '\'' | '(' | ')' | '*' | '+' | ',' | ';' | '=')
matches!(
c,
'!' | '$' | '&' | '\'' | '(' | ')' | '*' | '+' | ',' | ';' | '='
)
}

// Here again, order is important. As URLs/IRIs have letters in them
Expand All @@ -76,26 +81,18 @@ fn is_scheme(c: char) -> bool {
is_alpha(c) || is_digit(c) || is_scheme(c)

Check failure on line 81 in src/parser/parse_from_text/link_element.rs

View workflow job for this annotation

GitHub Actions / clippy

mismatched types

error[E0308]: mismatched types --> src/parser/parse_from_text/link_element.rs:81:14 | 81 | is_alpha(c) || is_digit(c) || is_scheme(c) | -------- ^ expected `u8`, found `char` | | | arguments to this function are incorrect | note: function defined here --> /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/nom-7.1.3/src/character/mod.rs:21:8 | 21 | pub fn is_alphabetic(chr: u8) -> bool { | ^^^^^^^^^^^^^
}


fn is_ipv4(c: char) -> bool {
is_digit(c) || c == '.'
}

fn ipv4(input: &str) -> IResult<&str, &str> {
let (input, ipv4_) = recognize(tuple((
complete::u8,
char('.'),
complete::u8,
char('.'),
complete::u8,
char('.'),
complete::u8
)))(input)?;
let (input, ipv4_) =
recognize(tuple((u8, char('.'), u8, char('.'), u8, char('.'), u8)))(input)?;
Ok((input, ipv4_))
}

fn is_ireg_name(c: char) -> bool {
is_iunreserved(c) || is_pct_encoded(c) || is_sub_delims(c)
is_iunreserved(c) || is_pct_encoded(c) || is_sub_delim(c)

Check failure on line 95 in src/parser/parse_from_text/link_element.rs

View workflow job for this annotation

GitHub Actions / clippy

mismatched types

error[E0308]: mismatched types --> src/parser/parse_from_text/link_element.rs:95:41 | 95 | is_iunreserved(c) || is_pct_encoded(c) || is_sub_delim(c) | -------------- ^ expected array `[char; 3]`, found `char` | | | arguments to this function are incorrect | note: function defined here --> src/parser/parse_from_text/link_element.rs:67:4 | 67 | fn is_pct_encoded(c: [char; 3]) -> bool { | ^^^^^^^^^^^^^^ ------------
}

fn h16(input: &str) -> IResult<&str, &str> {
Expand All @@ -118,32 +115,68 @@ fn ipv6(input: &str) -> IResult<&str, &str> {
alt((
recognize(tuple((count(h16_and_period, 6), ls32))),
recognize(tuple((double_period, many_m_n(5, 5, h16_and_period), ls32))),
recognize(tuple((opt(h16), double_period, many_m_n(4, 4, h16_and_period), ls32))),
recognize(tuple((opt(tuple((many_m_n(0, 1, h16_and_period), ))), double_period, count(h16_and_period, 3), ls32))),
recognize(tuple((opt(tuple((many_m_n(0, 2, h16_and_period), h16))), double_period, count(h16_and_period, 2), ls32))),
recognize(tuple((opt(tuple((many_m_n(0, 3, h16_and_period), h16))), double_period, count(h16_and_period, 1), ls32))),
recognize(tuple((opt(tuple((many_m_n(0, 4, h16_and_period), h16))), double_period, ls32))),
recognize(tuple((opt(tuple((many_m_n(0, 5, h16_and_period), h16))), double_period, h16))),
recognize(tuple((opt(tuple((many_m_n(0, 6, h16_and_period), h16))), double_period)))))(input)
recognize(tuple((
opt(h16),
double_period,
many_m_n(4, 4, h16_and_period),
ls32,
))),
recognize(tuple((
opt(tuple((many_m_n(0, 1, h16_and_period),))),
double_period,
count(h16_and_period, 3),
ls32,
))),
recognize(tuple((
opt(tuple((many_m_n(0, 2, h16_and_period), h16))),
double_period,
count(h16_and_period, 2),
ls32,
))),
recognize(tuple((
opt(tuple((many_m_n(0, 3, h16_and_period), h16))),
double_period,
count(h16_and_period, 1),
ls32,
))),
recognize(tuple((
opt(tuple((many_m_n(0, 4, h16_and_period), h16))),
double_period,
ls32,
))),
recognize(tuple((
opt(tuple((many_m_n(0, 5, h16_and_period), h16))),
double_period,
h16,
))),
recognize(tuple((
opt(tuple((many_m_n(0, 6, h16_and_period), h16))),
double_period,
))),
))(input)
}


fn is_ipvfuture_last(c: char) -> bool {
is_unreserved(c) || is_sub_delims(c) || c == ':'
is_unreserved(c) || is_sub_delim(c) || c == ':'
}

fn ipvfuture(input: &str) -> IResult<&str, &str> {
tuple((char('v'), take_while_m_n(1, 1, is_hex_digit), char('.'), take_while_m_n(1, 1, is_ipvfuture_last)))(input)
tuple((
char('v'),
take_while_m_n(1, 1, is_hex_digit),
char('.'),
take_while_m_n(1, 1, is_ipvfuture_last),
))(input)

Check failure on line 169 in src/parser/parse_from_text/link_element.rs

View workflow job for this annotation

GitHub Actions / clippy

mismatched types

error[E0308]: mismatched types --> src/parser/parse_from_text/link_element.rs:164:5 | 163 | fn ipvfuture(input: &str) -> IResult<&str, &str> { | ------------------- expected `std::result::Result<(&str, &str), nom::Err<nom::error::Error<&str>>>` because of return type 164 | / tuple(( 165 | | char('v'), 166 | | take_while_m_n(1, 1, is_hex_digit), 167 | | char('.'), 168 | | take_while_m_n(1, 1, is_ipvfuture_last), 169 | | ))(input) | |_____________^ expected `&str`, found tuple | = note: expected enum `std::result::Result<(&str, &str), nom::Err<nom::error::Error<&str>>>` found enum `std::result::Result<(&str, (char, &str, char, &str)), nom::Err<_>>`
}

fn ip_literal(input: &str) -> IResult<&str, &str> {
delimited(char('['), alt(ipv6, ipvfuture), char(']'))(input)
delimited(char('['), alt((ipv6, ipvfuture)), char(']'))(input)
}

/// Parse host
///
/// # Description
///
///
/// Parse host. Returns the rest, the host string and a boolean indicating
/// if it is IPvFuture or IPv6.
fn parse_host(input: &str) -> IResult<&str, (&str, bool)> {
Expand All @@ -160,35 +193,46 @@ fn parse_host(input: &str) -> IResult<&str, (&str, bool)> {
}
}

fn is_userinfo(c: char) -> bool {
is_iunreserved(c) || is_pct_encoded(c) || is_sub_delim(c)

Check failure on line 197 in src/parser/parse_from_text/link_element.rs

View workflow job for this annotation

GitHub Actions / clippy

mismatched types

error[E0308]: mismatched types --> src/parser/parse_from_text/link_element.rs:197:41 | 197 | is_iunreserved(c) || is_pct_encoded(c) || is_sub_delim(c) | -------------- ^ expected array `[char; 3]`, found `char` | | | arguments to this function are incorrect | note: function defined here --> src/parser/parse_from_text/link_element.rs:67:4 | 67 | fn is_pct_encoded(c: [char; 3]) -> bool { | ^^^^^^^^^^^^^^ ------------
}

fn iauthority(input: &str) -> IResult<&str, (&str, &str, &str, bool)> {
let (input, userinfo) = opt(take_while(is_userinfo), char('@'))(input)?;
let (input, userinfo) = opt(tuple((take_while(is_userinfo), char('@'))))(input)?;
let (input, (host, is_ipv6_or_future)) = parse_host(input)?;
let (input, port) = preceded(char(':'), take_while(is_digit))(input)?;
let userinfo = userinfo.unwrap_or("");

Check failure on line 204 in src/parser/parse_from_text/link_element.rs

View workflow job for this annotation

GitHub Actions / clippy

mismatched types

error[E0308]: mismatched types --> src/parser/parse_from_text/link_element.rs:204:39 | 204 | let userinfo = userinfo.unwrap_or(""); | --------- ^^ expected tuple, found `&str` | | | arguments to this function are incorrect | = note: expected tuple `(&str, char)` found reference `&'static str` note: associated function defined here
Ok((input, (userinfo, host, port, is_ipv6_or_future)))

Check failure on line 205 in src/parser/parse_from_text/link_element.rs

View workflow job for this annotation

GitHub Actions / clippy

mismatched types

error[E0308]: mismatched types --> src/parser/parse_from_text/link_element.rs:205:17 | 205 | Ok((input, (userinfo, host, port, is_ipv6_or_future))) | ^^^^^^^^ expected `&str`, found tuple | = note: expected reference `&str` found tuple `(&str, char)`
}

fn ihier_part(input: &str) -> IResult<&str, (&str, &str, &str, &str, bool)> {
let (input, (userinfo, host, port, is_ipv6_or_future)) = preceded(tag("//"), iauthority)(input)?;
let (input, path) = opt(alt(
take_while(is_ipath_abempty),
take_while(is_ipath_absolute),
take_while(is_ipath_rootless)
))(input)?;
let (input, (userinfo, host, port, is_ipv6_or_future)) =
preceded(tag("//"), iauthority)(input)?;
let (input, path) = opt(alt((
recognize(tuple((
char('/'),
opt(tuple((
take_while1(is_ipchar),
many0(tuple((char('/'), take_while(is_ipchar)))),
))),
))), // ipath-absolute
recognize(tuple((
take_while1(is_ipchar),
many0(tuple((char('/'), take_while(is_ipchar)))),
))), // ipath_rootless
)))(input)?;
let path = path.unwrap_or(""); // it's ipath_empty
Ok((input, (userinfo, host, port, path, is_ipv6_or_future)))
}

fn is_ipchar(c: char) -> bool {
is_iunreserved(c) || is_pct_encoded(c) || is_sub_delims(c) || matches!(c, ':' | '@')
is_iunreserved(c) || is_pct_encoded(c) || is_sub_delim(c) || matches!(c, ':' | '@')

Check failure on line 229 in src/parser/parse_from_text/link_element.rs

View workflow job for this annotation

GitHub Actions / clippy

mismatched types

error[E0308]: mismatched types --> src/parser/parse_from_text/link_element.rs:229:41 | 229 | is_iunreserved(c) || is_pct_encoded(c) || is_sub_delim(c) || matches!(c, ':' | '@') | -------------- ^ expected array `[char; 3]`, found `char` | | | arguments to this function are incorrect | note: function defined here --> src/parser/parse_from_text/link_element.rs:67:4 | 67 | fn is_pct_encoded(c: [char; 3]) -> bool { | ^^^^^^^^^^^^^^ ------------
}

const IPRIVATE_RANGES: [RangeInclusive<u32>; 3] = [
0xe000..=0xf8ff,
0xf0000..=0xffffd,
0x100000..=0x10fffd,
];
const IPRIVATE_RANGES: [RangeInclusive<u32>; 3] =
[0xe000..=0xf8ff, 0xf0000..=0xffffd, 0x100000..=0x10fffd];

fn is_iprivate(c: char) -> bool {
let c = c as u32;
is_in_one_of_ranges(c, &IPRIVATE_RANGES[..])
}

Expand All @@ -205,7 +249,7 @@ fn is_ifragment(c: char) -> bool {
}

fn ifragment(input: &str) -> IResult<&str, &str> {
take_while(is_fragment)(input)
take_while(is_ifragment)(input)
}

fn scheme(input: &str) -> IResult<&str, &str> {
Expand All @@ -222,15 +266,18 @@ fn is_alphanum_or_hyphen_minus(char: char) -> bool {
pub fn link(input: &str) -> IResult<&str, Element> {
let (input, scheme) = scheme(input)?;
let (input, (userinfo, host, port, path, is_ipv6_or_future)) = ihier_part(input)?;
let (input, query) = opt(preceed(char('?'), take_while(is_query)))(input)?;
let (input, fragment) = opt(preceed(char('#'), take_while(is_ifragment)))(input)?;
let mut s = format!("{scheme}://{userinfo}@{host}:{port}{path}{query}{fragment}");
Ok((input, Element::Link {
destination: LinkDestination {
target: &s,
hostname: Some(hostport),
punycode: None,
scheme: scheme
}
}))
let (input, Some(query)) = opt(preceded(char('?'), take_while(is_iquery)))(input)?;
let (input, Some(fragment)) = opt(preceded(char('#'), take_while(is_ifragment)))(input)?;
let mut s = format!("{scheme}://{userinfo}@{host}:{port}{path}?{query}#{fragment}");
Ok((
input,
Element::Link {
destination: LinkDestination {
target: &s,
hostname: Some(host),
punycode: None,
scheme: scheme,

Check warning on line 279 in src/parser/parse_from_text/link_element.rs

View workflow job for this annotation

GitHub Actions / clippy

redundant field names in struct initialization

warning: redundant field names in struct initialization --> src/parser/parse_from_text/link_element.rs:279:17 | 279 | scheme: scheme, | ^^^^^^^^^^^^^^ help: replace it with: `scheme` | = note: `#[warn(clippy::redundant_field_names)]` on by default = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names
},
},
))
}
7 changes: 5 additions & 2 deletions src/parser/parse_from_text/markdown_elements.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
use crate::parser::parse_from_text::text_elements::email_address;

use crate::parser::link_url::LinkDestination;
use super::base_parsers::{
direct_delimited, is_white_space, is_white_space_but_not_linebreak, CustomError,
};
use super::text_elements::parse_text_element;
use crate::parser::parse_from_text::link_element::link;
use super::Element;
use super::{base_parsers::*, parse_all};
use crate::parser::link_url::LinkDestination;
use crate::parser::parse_from_text::link_element::link;
///! nom parsers for markdown elements
use nom::{
bytes::complete::{is_not, tag, take, take_while},
Expand Down
4 changes: 2 additions & 2 deletions src/parser/parse_from_text/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ use super::Element;

pub(crate) mod base_parsers;
mod desktop_subset;
mod find_range;
pub mod hashtag_content_char_ranges;
mod link_element;
mod markdown_elements;
mod text_elements;
mod link_element;
mod find_range;

/// parses text elements such as links and email addresses, excluding markdown
pub(crate) fn parse_only_text(input: &str) -> std::vec::Vec<Element> {
Expand Down
3 changes: 2 additions & 1 deletion src/parser/parse_from_text/text_elements.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
///! nom parsers for text elements
use crate::parser::link_url::LinkDestination;

Check warning on line 2 in src/parser/parse_from_text/text_elements.rs

View workflow job for this annotation

GitHub Actions / clippy

unused import: `crate::parser::link_url::LinkDestination`

warning: unused import: `crate::parser::link_url::LinkDestination` --> src/parser/parse_from_text/text_elements.rs:2:5 | 2 | use crate::parser::link_url::LinkDestination; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Check failure on line 2 in src/parser/parse_from_text/text_elements.rs

View workflow job for this annotation

GitHub Actions / Build and test (ubuntu-latest, 1.64.0)

unused import: `crate::parser::link_url::LinkDestination`

use super::base_parsers::CustomError;
use super::base_parsers::*;

Check warning on line 5 in src/parser/parse_from_text/text_elements.rs

View workflow job for this annotation

GitHub Actions / clippy

unused import: `super::base_parsers::*`

warning: unused import: `super::base_parsers::*` --> src/parser/parse_from_text/text_elements.rs:5:5 | 5 | use super::base_parsers::*; | ^^^^^^^^^^^^^^^^^^^^^^

Check failure on line 5 in src/parser/parse_from_text/text_elements.rs

View workflow job for this annotation

GitHub Actions / Build and test (ubuntu-latest, 1.64.0)

unused import: `super::base_parsers::*`
use super::link_element::link;
use super::hashtag_content_char_ranges::hashtag_content_char;
use super::link_element::link;
use super::Element;
use crate::nom::{Offset, Slice};
use nom::bytes::complete::take_while;
Expand Down

0 comments on commit ed94a50

Please sign in to comment.