So I am using the nom
combinator map and, for reasons that I fully understand, the compiler is unable to determine the error type E
, though I know what it should be. Since map
has six generic types and the compiler needs help with just one of them, is there a way to specify just this type without all the others since this would be very tedious?
I know one way is to save the returned IResult
to a variable so that I can specify its type but is this really necessary? I don't really have any need to do this except to be able to tell the compiler the error type. To be more specific, my enclosing function returns a Result
with an error type to which I can convert the desired map
error type by having implemented the From
trait. So I'd like to be able to use the ?
operator on the map
result, but this is why the compile doesn't know the map
error type.