INNER CODE UNIT · Rust
checked
CluvexStudio/Aether · aether/src/lib.rs:190
fn checked(self) -> Result<Self> {
match (self.outer, self.inner) {
(Some(outer), Some(inner)) if outer.ip() == inner.ip() => {
Err(AetherError::Other(format!(
"warp-in-warp needs two separate edges, but both hops point at {}",
outer.ip()
)))
}
_ => Ok(self),
}
}
}
/// Reads one endpoint. The port has to be written out: which port answers is
/// the part that differs from network to network, so filling one in on
/// somebody's behalf would only send them at an address nobody offered.
fn parse_endpoint(raw: &str) -> Result<SocketAddr> {
let text = raw.trim();