I'm trying to use `backoff` and `map_err`, what is the correct way for `Transient` errors

Viewed 20

I am trying to handle errors in a way that looks like this:

enter image description here

The first ConnectionLost case seems to be fine, but for the other case I'm getting the following cargo check errors:

Expected function, found `backoff::Error::Transient` [E0618]
This function takes 2 parameters but 1 parameter was supplied [E0061]

I was under the impression that if I want to I can only supply one argument to Transient. I am using the latest version of backoff = 0.4.0.

1 Answers
Related