Closed jendrikw closed 1 year ago
Yes, the I
type parameter will be recognized as u8
by the compiler.
Fixed by dc3b95f
Sorry to bother you, but I found the same issue for skip
and list
:
error: type parameter `I` goes unused in function definition
--> src/utf8.rs:303:15
|
303 | pub fn skip<'a, I>(n: usize) -> Parser<'a, ()> {
| ^^^ help: consider removing the parameter
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_type_parameters
note: the lint level is defined here
--> src/lib.rs:1:9
|
1 | #![deny(clippy::extra_unused_type_parameters)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: type parameter `I` goes unused in function definition
--> src/utf8.rs:393:17
|
393 | pub fn list<'a, I, O, U>(item: Parser<'a, O>, separator: Parser<'a, U>) -> Parser<'a, Vec<O>>
| ^^^ help: consider removing the parameter
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_type_parameters
error: could not compile `pom` (lib) due to 2 previous errors
Fixed, thanks
The compiler can't infer the type because
I
is literally never used. Might be a copy-paste error?See also https://rust-lang.github.io/rust-clippy/master/index.html#/extra_unused_type_parameters