Skip to content

Commit

Permalink
Auto merge of #625 - Mark-Simulacrum:opt, r=Mark-Simulacrum
Browse files Browse the repository at this point in the history
Fix deserializing network-access failure reason

I think this is long-standing bug but exacerbated by #624.
  • Loading branch information
bors committed Mar 24, 2022
2 parents a674903 + 17b649f commit 75c8513
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/results/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -256,15 +256,16 @@ impl ::std::str::FromStr for FailureReason {
}
Ok(FailureReason::DependsOn(krates))
}
_ => bail!("unexpected value"),
_ => bail!("unexpected prefix: {}", prefix),
}
} else {
match s {
"network-access" => Ok(FailureReason::NetworkAccess),
"unknown" => Ok(FailureReason::Unknown),
"oom" => Ok(FailureReason::OOM),
"timeout" => Ok(FailureReason::Timeout),
"ice" => Ok(FailureReason::ICE),
_ => bail!("unexpected value"),
_ => bail!("unexpected value: {}", s),
}
}
}
Expand Down

0 comments on commit 75c8513

Please sign in to comment.