fn e_at(addr: SocketAddr, e: DialError) -> DialErrorExpand description
Name the address a flattened multi-address failure came from.
dial_quic collapses several attempts into one error, which is exactly the
lossiness a probe must not have — and is fine here, because a caller of
dial_quic asked for one connection and not for a measurement. Saying
which address produced the surviving error is the least it can do.
§It must not relabel the phase while it does that
Every arm returns the variant it was given, and that is a correctness
requirement rather than tidiness: DialError::phase reads the variant, so
an arm that rewrote a peer’s refusal into a Connect in order to prefix the
address would make is_local answer true for a relay that answered a
handshake, and would throw that handshake’s codes away with it. Prefixing a
peer’s failure means going inside HandshakeFailure and prefixing the
reason, which keeps its codes as well as its phase.