some fixes #62
Annotations
41 errors and 8 warnings
test
Process completed with exit code 101.
|
`?` couldn't convert the error to `nom::Err<parser::parse_from_text::base_parsers::CustomError<&str>>`:
src/parser/parse_from_text/markdown_elements.rs#L98
error[E0277]: `?` couldn't convert the error to `nom::Err<parser::parse_from_text::base_parsers::CustomError<&str>>`
--> src/parser/parse_from_text/markdown_elements.rs:98:37
|
93 | pub(crate) fn delimited_link(input: &str) -> IResult<&str, Element, CustomError<&str>> {
| ----------------------------------------- expected `nom::Err<parser::parse_from_text::base_parsers::CustomError<&str>>` because of this
...
98 | let (rest, link) = link(content)?;
| ^ the trait `std::convert::From<nom::Err<nom::error::Error<&str>>>` is not implemented for `nom::Err<parser::parse_from_text::base_parsers::CustomError<&str>>`
|
= note: the question mark operation (`?`) implicitly performs a conversion on the error value using the `From` trait
= help: the following other types implement trait `std::ops::FromResidual<R>`:
<std::result::Result<T, F> as std::ops::FromResidual<std::ops::Yeet<E>>>
<std::result::Result<T, F> as std::ops::FromResidual<std::result::Result<std::convert::Infallible, E>>>
= note: required because of the requirements on the impl of `std::ops::FromResidual<std::result::Result<std::convert::Infallible, nom::Err<nom::error::Error<&str>>>>` for `std::result::Result<(&str, parser::Element<'_>), nom::Err<parser::parse_from_text::base_parsers::CustomError<&str>>>`
|
cannot find value `hostport` in this scope:
src/parser/parse_from_text/link_element.rs#L231
error[E0425]: cannot find value `hostport` in this scope
--> src/parser/parse_from_text/link_element.rs:231:28
|
231 | hostname: Some(hostport),
| ^^^^^^^^ not found in this scope
|
cannot find function `preceed` in this scope:
src/parser/parse_from_text/link_element.rs#L226
error[E0425]: cannot find function `preceed` in this scope
--> src/parser/parse_from_text/link_element.rs:226:33
|
226 | let (input, fragment) = opt(preceed(char('#'), take_while(is_ifragment)))(input)?;
| ^^^^^^^ help: a function with a similar name exists: `preceded`
|
::: /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/nom-7.1.3/src/sequence/mod.rs:63:1
|
63 | / pub fn preceded<I, O1, O2, E: ParseError<I>, F, G>(
64 | | mut first: F,
65 | | mut second: G,
66 | | ) -> impl FnMut(I) -> IResult<I, O2, E>
67 | | where
68 | | F: Parser<I, O1, E>,
69 | | G: Parser<I, O2, E>,
| |______________________- similarly named function `preceded` defined here
|
cannot find function `opt` in this scope:
src/parser/parse_from_text/link_element.rs#L226
error[E0425]: cannot find function `opt` in this scope
--> src/parser/parse_from_text/link_element.rs:226:29
|
226 | let (input, fragment) = opt(preceed(char('#'), take_while(is_ifragment)))(input)?;
| ^^^ not found in this scope
|
help: consider importing this function
|
1 | use nom::combinator::opt;
|
|
cannot find value `is_query` in this scope:
src/parser/parse_from_text/link_element.rs#L225
error[E0425]: cannot find value `is_query` in this scope
--> src/parser/parse_from_text/link_element.rs:225:60
|
195 | fn is_iquery(c: char) -> bool {
| ----------------------------- similarly named function `is_iquery` defined here
...
225 | let (input, query) = opt(preceed(char('?'), take_while(is_query)))(input)?;
| ^^^^^^^^ help: a function with a similar name exists: `is_iquery`
|
cannot find function `preceed` in this scope:
src/parser/parse_from_text/link_element.rs#L225
error[E0425]: cannot find function `preceed` in this scope
--> src/parser/parse_from_text/link_element.rs:225:30
|
225 | let (input, query) = opt(preceed(char('?'), take_while(is_query)))(input)?;
| ^^^^^^^ help: a function with a similar name exists: `preceded`
|
::: /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/nom-7.1.3/src/sequence/mod.rs:63:1
|
63 | / pub fn preceded<I, O1, O2, E: ParseError<I>, F, G>(
64 | | mut first: F,
65 | | mut second: G,
66 | | ) -> impl FnMut(I) -> IResult<I, O2, E>
67 | | where
68 | | F: Parser<I, O1, E>,
69 | | G: Parser<I, O2, E>,
| |______________________- similarly named function `preceded` defined here
|
cannot find function `opt` in this scope:
src/parser/parse_from_text/link_element.rs#L225
error[E0425]: cannot find function `opt` in this scope
--> src/parser/parse_from_text/link_element.rs:225:26
|
225 | let (input, query) = opt(preceed(char('?'), take_while(is_query)))(input)?;
| ^^^ not found in this scope
|
help: consider importing this function
|
1 | use nom::combinator::opt;
|
|
cannot find value `is_fragment` in this scope:
src/parser/parse_from_text/link_element.rs#L208
error[E0425]: cannot find value `is_fragment` in this scope
--> src/parser/parse_from_text/link_element.rs:208:16
|
203 | fn is_ifragment(c: char) -> bool {
| -------------------------------- similarly named function `is_ifragment` defined here
...
208 | take_while(is_fragment)(input)
| ^^^^^^^^^^^ help: a function with a similar name exists: `is_ifragment`
|
cannot find function `is_in_one_of_ranges` in this scope:
src/parser/parse_from_text/link_element.rs#L192
error[E0425]: cannot find function `is_in_one_of_ranges` in this scope
--> src/parser/parse_from_text/link_element.rs:192:5
|
192 | is_in_one_of_ranges(c, &IPRIVATE_RANGES[..])
| ^^^^^^^^^^^^^^^^^^^ not found in this scope
|
help: consider importing this function
|
1 | use crate::parser::parse_from_text::find_range::is_in_one_of_ranges;
|
|
cannot find function `is_sub_delims` in this scope:
src/parser/parse_from_text/link_element.rs#L181
error[E0425]: cannot find function `is_sub_delims` in this scope
--> src/parser/parse_from_text/link_element.rs:181:47
|
69 | fn is_sub_delim(c: char) -> bool {
| -------------------------------- similarly named function `is_sub_delim` defined here
...
181 | is_iunreserved(c) || is_pct_encoded(c) || is_sub_delims(c) || matches!(c, ':' | '@')
| ^^^^^^^^^^^^^ help: a function with a similar name exists: `is_sub_delim`
|
cannot find value `is_ipath_rootless` in this scope:
src/parser/parse_from_text/link_element.rs#L175
error[E0425]: cannot find value `is_ipath_rootless` in this scope
--> src/parser/parse_from_text/link_element.rs:175:20
|
175 | take_while(is_ipath_rootless)
| ^^^^^^^^^^^^^^^^^ not found in this scope
|
cannot find value `is_ipath_absolute` in this scope:
src/parser/parse_from_text/link_element.rs#L174
error[E0425]: cannot find value `is_ipath_absolute` in this scope
--> src/parser/parse_from_text/link_element.rs:174:20
|
174 | take_while(is_ipath_absolute),
| ^^^^^^^^^^^^^^^^^ not found in this scope
|
cannot find value `is_ipath_abempty` in this scope:
src/parser/parse_from_text/link_element.rs#L173
error[E0425]: cannot find value `is_ipath_abempty` in this scope
--> src/parser/parse_from_text/link_element.rs:173:20
|
173 | take_while(is_ipath_abempty),
| ^^^^^^^^^^^^^^^^ not found in this scope
|
cannot find function `alt` in this scope:
src/parser/parse_from_text/link_element.rs#L172
error[E0425]: cannot find function `alt` in this scope
--> src/parser/parse_from_text/link_element.rs:172:29
|
172 | let (input, path) = opt(alt(
| ^^^ not found in this scope
|
help: consider importing this function
|
1 | use nom::branch::alt;
|
|
cannot find function `opt` in this scope:
src/parser/parse_from_text/link_element.rs#L172
error[E0425]: cannot find function `opt` in this scope
--> src/parser/parse_from_text/link_element.rs:172:25
|
172 | let (input, path) = opt(alt(
| ^^^ not found in this scope
|
help: consider importing this function
|
1 | use nom::combinator::opt;
|
|
cannot find value `is_userinfo` in this scope:
src/parser/parse_from_text/link_element.rs#L164
error[E0425]: cannot find value `is_userinfo` in this scope
--> src/parser/parse_from_text/link_element.rs:164:44
|
164 | let (input, userinfo) = opt(take_while(is_userinfo), char('@'))(input)?;
| ^^^^^^^^^^^ not found in this scope
|
cannot find function `opt` in this scope:
src/parser/parse_from_text/link_element.rs#L164
error[E0425]: cannot find function `opt` in this scope
--> src/parser/parse_from_text/link_element.rs:164:29
|
164 | let (input, userinfo) = opt(take_while(is_userinfo), char('@'))(input)?;
| ^^^ not found in this scope
|
help: consider importing this function
|
1 | use nom::combinator::opt;
|
|
cannot find function `alt` in this scope:
src/parser/parse_from_text/link_element.rs#L157
error[E0425]: cannot find function `alt` in this scope
--> src/parser/parse_from_text/link_element.rs:157:33
|
157 | let (input, host) = alt((ipv4, take_while(is_ireg_name)))(input)?;
| ^^^ not found in this scope
|
help: consider importing this function
|
1 | use nom::branch::alt;
|
|
cannot find function `alt` in this scope:
src/parser/parse_from_text/link_element.rs#L140
error[E0425]: cannot find function `alt` in this scope
--> src/parser/parse_from_text/link_element.rs:140:26
|
140 | delimited(char('['), alt(ipv6, ipvfuture), char(']'))(input)
| ^^^ not found in this scope
|
help: consider importing this function
|
1 | use nom::branch::alt;
|
|
cannot find function `delimited` in this scope:
src/parser/parse_from_text/link_element.rs#L140
error[E0425]: cannot find function `delimited` in this scope
--> src/parser/parse_from_text/link_element.rs:140:5
|
140 | delimited(char('['), alt(ipv6, ipvfuture), char(']'))(input)
| ^^^^^^^^^ not found in this scope
|
help: consider importing this function
|
1 | use nom::sequence::delimited;
|
|
cannot find function `take_while_m_n` in this scope:
src/parser/parse_from_text/link_element.rs#L136
error[E0425]: cannot find function `take_while_m_n` in this scope
--> src/parser/parse_from_text/link_element.rs:136:70
|
136 | tuple((char('v'), take_while_m_n(1, 1, is_hex_digit), char('.'), take_while_m_n(1, 1, is_ipvfuture_last)))(input)
| ^^^^^^^^^^^^^^
|
::: /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/nom-7.1.3/src/bytes/complete.rs:183:1
|
183 | / pub fn take_while<F, Input, Error: ParseError<Input>>(
184 | | cond: F,
185 | | ) -> impl Fn(Input) -> IResult<Input, Input, Error>
186 | | where
187 | | Input: InputTakeAtPosition,
188 | | F: Fn(<Input as InputTakeAtPosition>::Item) -> bool,
| |______________________________________________________- similarly named function `take_while` defined here
|
help: a function with a similar name exists
|
136 | tuple((char('v'), take_while_m_n(1, 1, is_hex_digit), char('.'), take_while(1, 1, is_ipvfuture_last)))(input)
| ~~~~~~~~~~
help: consider importing one of these items
|
1 | use nom::bytes::complete::take_while_m_n;
|
1 | use nom::bytes::streaming::take_while_m_n;
|
|
cannot find function `take_while_m_n` in this scope:
src/parser/parse_from_text/link_element.rs#L136
error[E0425]: cannot find function `take_while_m_n` in this scope
--> src/parser/parse_from_text/link_element.rs:136:23
|
136 | tuple((char('v'), take_while_m_n(1, 1, is_hex_digit), char('.'), take_while_m_n(1, 1, is_ipvfuture_last)))(input)
| ^^^^^^^^^^^^^^
|
::: /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/nom-7.1.3/src/bytes/complete.rs:183:1
|
183 | / pub fn take_while<F, Input, Error: ParseError<Input>>(
184 | | cond: F,
185 | | ) -> impl Fn(Input) -> IResult<Input, Input, Error>
186 | | where
187 | | Input: InputTakeAtPosition,
188 | | F: Fn(<Input as InputTakeAtPosition>::Item) -> bool,
| |______________________________________________________- similarly named function `take_while` defined here
|
help: a function with a similar name exists
|
136 | tuple((char('v'), take_while(1, 1, is_hex_digit), char('.'), take_while_m_n(1, 1, is_ipvfuture_last)))(input)
| ~~~~~~~~~~
help: consider importing one of these items
|
1 | use nom::bytes::complete::take_while_m_n;
|
1 | use nom::bytes::streaming::take_while_m_n;
|
|
cannot find function `is_sub_delims` in this scope:
src/parser/parse_from_text/link_element.rs#L132
error[E0425]: cannot find function `is_sub_delims` in this scope
--> src/parser/parse_from_text/link_element.rs:132:25
|
69 | fn is_sub_delim(c: char) -> bool {
| -------------------------------- similarly named function `is_sub_delim` defined here
...
132 | is_unreserved(c) || is_sub_delims(c) || c == ':'
| ^^^^^^^^^^^^^ help: a function with a similar name exists: `is_sub_delim`
|
cannot find function `opt` in this scope:
src/parser/parse_from_text/link_element.rs#L127
error[E0425]: cannot find function `opt` in this scope
--> src/parser/parse_from_text/link_element.rs:127:26
|
127 | recognize(tuple((opt(tuple((many_m_n(0, 6, h16_and_period), h16))), double_period)))))(input)
| ^^^ not found in this scope
|
help: consider importing this function
|
1 | use nom::combinator::opt;
|
|
cannot find function `opt` in this scope:
src/parser/parse_from_text/link_element.rs#L126
error[E0425]: cannot find function `opt` in this scope
--> src/parser/parse_from_text/link_element.rs:126:26
|
126 | recognize(tuple((opt(tuple((many_m_n(0, 5, h16_and_period), h16))), double_period, h16))),
| ^^^ not found in this scope
|
help: consider importing this function
|
1 | use nom::combinator::opt;
|
|
cannot find function `opt` in this scope:
src/parser/parse_from_text/link_element.rs#L125
error[E0425]: cannot find function `opt` in this scope
--> src/parser/parse_from_text/link_element.rs:125:26
|
125 | recognize(tuple((opt(tuple((many_m_n(0, 4, h16_and_period), h16))), double_period, ls32))),
| ^^^ not found in this scope
|
help: consider importing this function
|
1 | use nom::combinator::opt;
|
|
cannot find function `opt` in this scope:
src/parser/parse_from_text/link_element.rs#L124
error[E0425]: cannot find function `opt` in this scope
--> src/parser/parse_from_text/link_element.rs:124:26
|
124 | recognize(tuple((opt(tuple((many_m_n(0, 3, h16_and_period), h16))), double_period, count(h16_and_period, 1), ls32))),
| ^^^ not found in this scope
|
help: consider importing this function
|
1 | use nom::combinator::opt;
|
|
cannot find function `opt` in this scope:
src/parser/parse_from_text/link_element.rs#L123
error[E0425]: cannot find function `opt` in this scope
--> src/parser/parse_from_text/link_element.rs:123:26
|
123 | recognize(tuple((opt(tuple((many_m_n(0, 2, h16_and_period), h16))), double_period, count(h16_and_period, 2), ls32))),
| ^^^ not found in this scope
|
help: consider importing this function
|
1 | use nom::combinator::opt;
|
|
cannot find function `opt` in this scope:
src/parser/parse_from_text/link_element.rs#L122
error[E0425]: cannot find function `opt` in this scope
--> src/parser/parse_from_text/link_element.rs:122:26
|
122 | recognize(tuple((opt(tuple((many_m_n(0, 1, h16_and_period), ))), double_period, count(h16_and_period, 3), ls32))),
| ^^^ not found in this scope
|
help: consider importing this function
|
1 | use nom::combinator::opt;
|
|
cannot find function `opt` in this scope:
src/parser/parse_from_text/link_element.rs#L121
error[E0425]: cannot find function `opt` in this scope
--> src/parser/parse_from_text/link_element.rs:121:26
|
121 | recognize(tuple((opt(h16), double_period, many_m_n(4, 4, h16_and_period), ls32))),
| ^^^ not found in this scope
|
help: consider importing this function
|
1 | use nom::combinator::opt;
|
|
cannot find function `alt` in this scope:
src/parser/parse_from_text/link_element.rs#L118
error[E0425]: cannot find function `alt` in this scope
--> src/parser/parse_from_text/link_element.rs:118:5
|
118 | alt((
| ^^^ not found in this scope
|
help: consider importing this function
|
1 | use nom::branch::alt;
|
|
cannot find function `alt` in this scope:
src/parser/parse_from_text/link_element.rs#L106
error[E0425]: cannot find function `alt` in this scope
--> src/parser/parse_from_text/link_element.rs:106:5
|
106 | alt((tuple((h16, char(':'), h16)), ipv4))(input)
| ^^^ not found in this scope
|
help: consider importing this function
|
1 | use nom::branch::alt;
|
|
cannot find function `take_while_m_n` in this scope:
src/parser/parse_from_text/link_element.rs#L102
error[E0425]: cannot find function `take_while_m_n` in this scope
--> src/parser/parse_from_text/link_element.rs:102:5
|
102 | take_while_m_n(1, 4, is_hex_digit)(input)
| ^^^^^^^^^^^^^^
|
::: /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/nom-7.1.3/src/bytes/complete.rs:183:1
|
183 | / pub fn take_while<F, Input, Error: ParseError<Input>>(
184 | | cond: F,
185 | | ) -> impl Fn(Input) -> IResult<Input, Input, Error>
186 | | where
187 | | Input: InputTakeAtPosition,
188 | | F: Fn(<Input as InputTakeAtPosition>::Item) -> bool,
| |______________________________________________________- similarly named function `take_while` defined here
|
help: a function with a similar name exists
|
102 | take_while(1, 4, is_hex_digit)(input)
| ~~~~~~~~~~
help: consider importing one of these items
|
1 | use nom::bytes::complete::take_while_m_n;
|
1 | use nom::bytes::streaming::take_while_m_n;
|
|
cannot find function `is_sub_delims` in this scope:
src/parser/parse_from_text/link_element.rs#L98
error[E0425]: cannot find function `is_sub_delims` in this scope
--> src/parser/parse_from_text/link_element.rs:98:47
|
69 | fn is_sub_delim(c: char) -> bool {
| -------------------------------- similarly named function `is_sub_delim` defined here
...
98 | is_iunreserved(c) || is_pct_encoded(c) || is_sub_delims(c)
| ^^^^^^^^^^^^^ help: a function with a similar name exists: `is_sub_delim`
|
cannot find function `is_in_one_of_ranges` in this scope:
src/parser/parse_from_text/link_element.rs#L50
error[E0425]: cannot find function `is_in_one_of_ranges` in this scope
--> src/parser/parse_from_text/link_element.rs:50:5
|
50 | is_in_one_of_ranges(c, &ucschar_ranges[..])
| ^^^^^^^^^^^^^^^^^^^ not found in this scope
|
help: consider importing this function
|
1 | use crate::parser::parse_from_text::find_range::is_in_one_of_ranges;
|
|
failed to resolve: use of undeclared crate or module `complete`:
src/parser/parse_from_text/link_element.rs#L92
error[E0433]: failed to resolve: use of undeclared crate or module `complete`
--> src/parser/parse_from_text/link_element.rs:92:9
|
92 | complete::u8
| ^^^^^^^^ use of undeclared crate or module `complete`
|
failed to resolve: use of undeclared crate or module `complete`:
src/parser/parse_from_text/link_element.rs#L90
error[E0433]: failed to resolve: use of undeclared crate or module `complete`
--> src/parser/parse_from_text/link_element.rs:90:9
|
90 | complete::u8,
| ^^^^^^^^ use of undeclared crate or module `complete`
|
failed to resolve: use of undeclared crate or module `complete`:
src/parser/parse_from_text/link_element.rs#L88
error[E0433]: failed to resolve: use of undeclared crate or module `complete`
--> src/parser/parse_from_text/link_element.rs:88:9
|
88 | complete::u8,
| ^^^^^^^^ use of undeclared crate or module `complete`
|
failed to resolve: use of undeclared crate or module `complete`:
src/parser/parse_from_text/link_element.rs#L86
error[E0433]: failed to resolve: use of undeclared crate or module `complete`
--> src/parser/parse_from_text/link_element.rs:86:9
|
86 | complete::u8,
| ^^^^^^^^ use of undeclared crate or module `complete`
|
unresolved import `nom::character::char`:
src/parser/parse_from_text/link_element.rs#L9
error[E0432]: unresolved import `nom::character::char`
--> src/parser/parse_from_text/link_element.rs:9:44
|
9 | character::{is_alphabetic as is_alpha, char},
| ^^^^ no `char` in `character`
|
test
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v2. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
|
test
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|
unused import: `AsChar`:
src/parser/parse_from_text/link_element.rs#L13
warning: unused import: `AsChar`
--> src/parser/parse_from_text/link_element.rs:13:5
|
13 | AsChar, IResult,
| ^^^^^^
|
redundant field names in struct initialization:
src/parser/parse_from_text/link_element.rs#L233
warning: redundant field names in struct initialization
--> src/parser/parse_from_text/link_element.rs:233:13
|
233 | 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
|
unused import: `super::base_parsers::*`:
src/parser/parse_from_text/link_element.rs#L15
warning: unused import: `super::base_parsers::*`
--> src/parser/parse_from_text/link_element.rs:15:5
|
15 | use super::base_parsers::*;
| ^^^^^^^^^^^^^^^^^^^^^^
|
unused imports: `peek`, `take_while1`, `take`, `verify`:
src/parser/parse_from_text/link_element.rs#L7
warning: unused imports: `peek`, `take_while1`, `take`, `verify`
--> src/parser/parse_from_text/link_element.rs:7:25
|
7 | complete::{tag, take, take_while1, take_while},
| ^^^^ ^^^^^^^^^^^
...
10 | combinator::{peek, recognize, verify},
| ^^^^ ^^^^^^
|
unused imports: `Offset`, `Slice`:
src/parser/parse_from_text/link_element.rs#L4
warning: unused imports: `Offset`, `Slice`
--> src/parser/parse_from_text/link_element.rs:4:18
|
4 | use crate::nom::{Offset, Slice};
| ^^^^^^ ^^^^^
|
unused import: `crate::parser::link_url::LinkDestination`:
src/parser/parse_from_text/text_elements.rs#L2
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;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
|