There was an error while loading. Please reload this page.
1 parent ddeac72 commit 92aa88fCopy full SHA for 92aa88f
1 file changed
packages/hurl/src/http/ip.rs
@@ -16,8 +16,6 @@
16
*
17
*/
18
use std::fmt::{Display, Formatter};
19
-use std::net::AddrParseError;
20
-use std::str::FromStr;
21
22
/// An IP address, either IPv4 or IPv6.
23
///
@@ -31,13 +29,10 @@ pub struct IpAddr {
31
29
}
32
30
33
impl IpAddr {
+ /// Creates a new IP address from a raw string (from libcurl).
34
pub fn new(raw: String) -> IpAddr {
35
IpAddr { raw }
36
37
- #[allow(dead_code)]
38
- fn to_ip_addr(&self) -> Result<std::net::IpAddr, AddrParseError> {
39
- std::net::IpAddr::from_str(&self.raw)
40
- }
41
42
43
impl Display for IpAddr {
0 commit comments