Skip to content

some fixes

some fixes #68

Triggered via push February 17, 2024 11:32
Status Failure
Total duration 3m 36s
Artifacts
Fit to window
Zoom out
Zoom in

Annotations

10 errors and 11 warnings
test
Process completed with exit code 101.
mismatched types: src/parser/parse_from_text/link_element.rs#L235
error[E0308]: mismatched types --> src/parser/parse_from_text/link_element.rs:235:5 | 234 | fn take_while_ipchar(input: &str) -> IResult<&str, &str> { | ------------------- expected `std::result::Result<(&str, &str), nom::Err<nom::error::Error<&str>>>` because of return type 235 | / many0(alt((take_while(is_ipchar_not_pct_encoded), take_while(is_pct_encoded)))(input) 236 | | } | |_^ expected enum `std::result::Result`, found opaque type | ::: /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/nom-7.1.3/src/multi/mod.rs:53:39 | 53 | pub fn many0<I, O, E, F>(mut f: F) -> impl FnMut(I) -> IResult<I, Vec<O>, E> | -------------------------------------- the found opaque type | = note: expected enum `std::result::Result<(&str, &str), nom::Err<nom::error::Error<&str>>>` found opaque type `impl FnMut(_) -> std::result::Result<(_, std::vec::Vec<_>), nom::Err<_>>`
expected a `std::ops::FnMut<(_,)>` closure, found `std::result::Result<(&str, &str), nom::Err<_>>`: src/parser/parse_from_text/link_element.rs#L235
error[E0277]: expected a `std::ops::FnMut<(_,)>` closure, found `std::result::Result<(&str, &str), nom::Err<_>>` --> src/parser/parse_from_text/link_element.rs:235:11 | 235 | many0(alt((take_while(is_ipchar_not_pct_encoded), take_while(is_pct_encoded)))(input) | ----- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected an `FnMut<(_,)>` closure, found `std::result::Result<(&str, &str), nom::Err<_>>` | | | required by a bound introduced by this call | = help: the trait `std::ops::FnMut<(_,)>` is not implemented for `std::result::Result<(&str, &str), nom::Err<_>>` = help: the following other types implement trait `nom::Parser<I, O, E>`: <nom::And<F, G> as nom::Parser<I, (O1, O2), E>> <nom::AndThen<F, G, O1> as nom::Parser<I, O2, E>> <nom::FlatMap<F, G, O1> as nom::Parser<I, O2, E>> <nom::Into<F, O1, O2, E1, E2> as nom::Parser<I, O2, E2>> <nom::Map<F, G, O1> as nom::Parser<I, O2, E>> <nom::Or<F, G> as nom::Parser<I, O, E>> <std::boxed::Box<(dyn nom::Parser<I, O, E> + 'a)> as nom::Parser<I, O, E>> = note: required because of the requirements on the impl of `nom::Parser<_, _, _>` for `std::result::Result<(&str, &str), nom::Err<_>>` note: required by a bound in `nom::multi::many0` --> /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/nom-7.1.3/src/multi/mod.rs:56:6 | 56 | F: Parser<I, O, E>, | ^^^^^^^^^^^^^^^ required by this bound in `nom::multi::many0`
type mismatch resolving `<&str as nom::InputTakeAtPosition>::Item == [char; 3]`: src/parser/parse_from_text/link_element.rs#L235
error[E0271]: type mismatch resolving `<&str as nom::InputTakeAtPosition>::Item == [char; 3]` --> src/parser/parse_from_text/link_element.rs:235:55 | 235 | many0(alt((take_while(is_ipchar_not_pct_encoded), take_while(is_pct_encoded)))(input) | ^^^^^^^^^^ expected `char`, found array `[char; 3]`
mismatched types: src/parser/parse_from_text/link_element.rs#L199
error[E0308]: mismatched types --> src/parser/parse_from_text/link_element.rs:199:41 | 199 | 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:238:4 | 238 | fn is_pct_encoded(c: [char; 3]) -> bool { | ^^^^^^^^^^^^^^ ------------
mismatched types: src/parser/parse_from_text/link_element.rs#L92
error[E0308]: mismatched types --> src/parser/parse_from_text/link_element.rs:92:41 | 92 | 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:238:4 | 238 | fn is_pct_encoded(c: [char; 3]) -> bool { | ^^^^^^^^^^^^^^ ------------
cannot find function `is_ipchar` in this scope: src/parser/parse_from_text/link_element.rs#L258
error[E0425]: cannot find function `is_ipchar` in this scope --> src/parser/parse_from_text/link_element.rs:258:5 | 52 | fn is_ucschar(c: char) -> bool { | ------------------------------ similarly named function `is_ucschar` defined here ... 258 | is_ipchar(c) || matches!(c, '/' | '?') | ^^^^^^^^^ help: a function with a similar name exists: `is_ucschar`
cannot find value `is_ipchar` in this scope: src/parser/parse_from_text/link_element.rs#L223
error[E0425]: cannot find value `is_ipchar` in this scope --> src/parser/parse_from_text/link_element.rs:223:48 | 52 | fn is_ucschar(c: char) -> bool { | ------------------------------ similarly named function `is_ucschar` defined here ... 223 | many0(tuple((char('/'), take_while(is_ipchar)))), | ^^^^^^^^^ help: a function with a similar name exists: `is_ucschar`
cannot find value `is_ipchar` in this scope: src/parser/parse_from_text/link_element.rs#L218
error[E0425]: cannot find value `is_ipchar` in this scope --> src/parser/parse_from_text/link_element.rs:218:52 | 52 | fn is_ucschar(c: char) -> bool { | ------------------------------ similarly named function `is_ucschar` defined here ... 218 | many0(tuple((char('/'), take_while(is_ipchar)))), | ^^^^^^^^^ help: a function with a similar name exists: `is_ucschar`
cannot find value `is_ipchar` in this scope: src/parser/parse_from_text/link_element.rs#L217
error[E0425]: cannot find value `is_ipchar` in this scope --> src/parser/parse_from_text/link_element.rs:217:29 | 52 | fn is_ucschar(c: char) -> bool { | ------------------------------ similarly named function `is_ucschar` defined here ... 217 | take_while1(is_ipchar), | ^^^^^^^^^ help: a function with a similar name exists: `is_ucschar`
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/
redundant field names in struct initialization: src/parser/parse_from_text/link_element.rs#L293
warning: redundant field names in struct initialization --> src/parser/parse_from_text/link_element.rs:293:17 | 293 | 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}, | ^^^^ 9 | character::complete::{char, u8}, 10 | 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