diff --git a/src/resolve_addr.rs b/src/resolve_addr.rs index b283473f15..3ef21094cc 100644 --- a/src/resolve_addr.rs +++ b/src/resolve_addr.rs @@ -85,7 +85,7 @@ fn split<'a>(address: &'a str) -> Option<(&'a str, u16)> { addr }; - let p = p.trim_left_matches(':'); + let p = p.trim_start_matches(':'); match p.parse::() { Err(_) => None, Ok(port) => Some((addr, port)),