Skip to content

fixed many issues

fixed many issues #64

Triggered via push February 11, 2024 12:24
Status Failure
Total duration 3m 30s
Artifacts
Fit to window
Zoom out
Zoom in

Annotations

14 errors and 11 warnings
`?` couldn't convert the error to `nom::Err<parser::parse_from_text::base_parsers::CustomError<&str>>`: src/parser/parse_from_text/markdown_elements.rs#L101
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:101:37 | 96 | 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 ... 101 | 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>>>`
mismatched types: src/parser/parse_from_text/link_element.rs#L229
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 { | ^^^^^^^^^^^^^^ ------------
mismatched types: src/parser/parse_from_text/link_element.rs#L205
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)`
mismatched types: src/parser/parse_from_text/link_element.rs#L204
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
mismatched types: src/parser/parse_from_text/link_element.rs#L197
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 { | ^^^^^^^^^^^^^^ ------------
mismatched types: src/parser/parse_from_text/link_element.rs#L164
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<_>>`
mismatched types: src/parser/parse_from_text/link_element.rs#L107
error[E0308]: mismatched types --> src/parser/parse_from_text/link_element.rs:107:5 | 106 | fn h16_and_period(input: &str) -> IResult<&str, &str> { | ------------------- expected `std::result::Result<(&str, &str), nom::Err<nom::error::Error<&str>>>` because of return type 107 | tuple((h16, char(':')))(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, (&str, char)), nom::Err<nom::error::Error<&str>>>`
mismatched types: src/parser/parse_from_text/link_element.rs#L103
error[E0308]: mismatched types --> src/parser/parse_from_text/link_element.rs:103:5 | 102 | fn ls32(input: &str) -> IResult<&str, &str> { | ------------------- expected `std::result::Result<(&str, &str), nom::Err<nom::error::Error<&str>>>` because of return type 103 | alt((tuple((h16, char(':'), h16)), ipv4))(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, (&str, char, &str)), nom::Err<nom::error::Error<&str>>>`
type mismatch resolving `<for<'r> fn(&'r str) -> std::result::Result<(&'r str, &'r str), nom::Err<nom::error::Error<&'r str>>> {parser::parse_from_text::link_element::ipv4} as std::ops::FnOnce<(&str,)>>::Output == std::result::Result<(&str, (&str, char, &str)), nom::Err<nom::error::Error<&str>>>`: src/parser/parse_from_text/link_element.rs#L103
error[E0271]: type mismatch resolving `<for<'r> fn(&'r str) -> std::result::Result<(&'r str, &'r str), nom::Err<nom::error::Error<&'r str>>> {parser::parse_from_text::link_element::ipv4} as std::ops::FnOnce<(&str,)>>::Output == std::result::Result<(&str, (&str, char, &str)), nom::Err<nom::error::Error<&str>>>` --> src/parser/parse_from_text/link_element.rs:103:9 | 103 | alt((tuple((h16, char(':'), h16)), ipv4))(input) | --- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected tuple, found `&str` | | | required by a bound introduced by this call | = note: expected enum `std::result::Result<(&str, (&str, char, &str)), _>` found enum `std::result::Result<(&str, &str), _>` = note: required because of the requirements on the impl of `nom::Parser<&str, (&str, char, &str), nom::error::Error<&str>>` for `for<'r> fn(&'r str) -> std::result::Result<(&'r str, &'r str), nom::Err<nom::error::Error<&'r str>>> {parser::parse_from_text::link_element::ipv4}` = note: required because of the requirements on the impl of `nom::branch::Alt<&str, (&str, char, &str), nom::error::Error<&str>>` for `(impl FnMut(&str) -> std::result::Result<(&str, (&str, char, &str)), nom::Err<nom::error::Error<&str>>>, for<'r> fn(&'r str) -> std::result::Result<(&'r str, &'r str), nom::Err<nom::error::Error<&'r str>>> {parser::parse_from_text::link_element::ipv4})` note: required by a bound in `nom::branch::alt` --> /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/nom-7.1.3/src/branch/mod.rs:47:49 | 47 | pub fn alt<I: Clone, O, E: ParseError<I>, List: Alt<I, O, E>>( | ^^^^^^^^^^^^ required by this bound in `nom::branch::alt`
mismatched types: src/parser/parse_from_text/link_element.rs#L95
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 { | ^^^^^^^^^^^^^^ ------------
mismatched types: src/parser/parse_from_text/link_element.rs#L81
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 { | ^^^^^^^^^^^^^
mismatched types: src/parser/parse_from_text/link_element.rs#L56
error[E0308]: mismatched types --> src/parser/parse_from_text/link_element.rs:56:14 | 56 | is_alpha(c) || is_digit(c) || is_other_unreserved(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 { | ^^^^^^^^^^^^^
this function takes 1 argument but 0 arguments were supplied: src/parser/parse_from_text/link_element.rs#L27
error[E0061]: this function takes 1 argument but 0 arguments were supplied --> src/parser/parse_from_text/link_element.rs:27:7 | 27 | c.is_digit() | ^^^^^^^^-- an argument of type `u32` is missing | note: associated function defined here help: provide the argument | 27 | c.is_digit(/* u32 */) | ~~~~~~~~~~~~~~~~~~~
test
Process completed with exit code 101.
redundant field names in struct initialization: src/parser/parse_from_text/link_element.rs#L279
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
unused import: `super::base_parsers::*`: src/parser/parse_from_text/text_elements.rs#L5
warning: unused import: `super::base_parsers::*` --> src/parser/parse_from_text/text_elements.rs:5:5 | 5 | use super::base_parsers::*; | ^^^^^^^^^^^^^^^^^^^^^^
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; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
unused imports: `peek`, `take`, `verify`: src/parser/parse_from_text/link_element.rs#L8
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}, | ^^^^ ^^^^^^
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: `super::base_parsers::*`: src/parser/parse_from_text/link_element.rs#L1
warning: unused import: `super::base_parsers::*` --> src/parser/parse_from_text/link_element.rs:1:5 | 1 | use super::base_parsers::*; | ^^^^^^^^^^^^^^^^^^^^^^
unused imports: `direct_delimited`, `is_white_space_but_not_linebreak`, `is_white_space`: src/parser/parse_from_text/desktop_subset.rs#L6
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, | ^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
unused import: `super::base_parsers::*`: src/parser/parse_from_text/desktop_subset.rs#L4
warning: unused import: `super::base_parsers::*` --> src/parser/parse_from_text/desktop_subset.rs:4:5 | 4 | use super::base_parsers::*; | ^^^^^^^^^^^^^^^^^^^^^^
unused import: `Error`: src/parser/parse_from_text/base_parsers.rs#L6
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
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/