pub(crate) fn flatten_anyhow<T, E>(r: Result<Result<T>, E>) -> Result<T>Expand description
Flatten a nested Result<Result<T>>, defaulting to converting the error type to an anyhow::Error.
See https://doc.rust-lang.org/std/result/enum.Result.html#method.flatten