Skip to content

Commit 92aa88f

Browse files
jcamielhurl-bot
authored andcommitted
Remove dead code.
1 parent ddeac72 commit 92aa88f

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

  • packages/hurl/src/http

packages/hurl/src/http/ip.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@
1616
*
1717
*/
1818
use std::fmt::{Display, Formatter};
19-
use std::net::AddrParseError;
20-
use std::str::FromStr;
2119

2220
/// An IP address, either IPv4 or IPv6.
2321
///
@@ -31,13 +29,10 @@ pub struct IpAddr {
3129
}
3230

3331
impl IpAddr {
32+
/// Creates a new IP address from a raw string (from libcurl).
3433
pub fn new(raw: String) -> IpAddr {
3534
IpAddr { raw }
3635
}
37-
#[allow(dead_code)]
38-
fn to_ip_addr(&self) -> Result<std::net::IpAddr, AddrParseError> {
39-
std::net::IpAddr::from_str(&self.raw)
40-
}
4136
}
4237

4338
impl Display for IpAddr {

0 commit comments

Comments
 (0)