2121//!
2222//! [1]: https://crates.io/crates/postgres
2323//! [2]: https://github.com/sfackler
24- #![ doc( html_root_url="https://docs.rs/postgres-inet/0.1.2 " ) ]
24+ #![ doc( html_root_url="https://docs.rs/postgres-inet" ) ]
2525#![ warn( missing_docs) ]
2626
2727#[ macro_use]
@@ -32,7 +32,7 @@ extern crate libc;
3232
3333mod tests;
3434
35- use postgres:: types:: { Type , ToSql , FromSql , IsNull } ;
35+ use postgres:: types:: { self , Type , ToSql , FromSql , IsNull } ;
3636use std:: error:: Error ;
3737use std:: fmt;
3838use std:: net:: { IpAddr , Ipv4Addr , Ipv6Addr } ;
@@ -251,7 +251,7 @@ impl FromSql for MaskedIpAddr {
251251
252252 fn accepts ( ty : & Type ) -> bool {
253253 match * ty {
254- Type :: Cidr | Type :: Inet => true ,
254+ types :: CIDR | types :: INET => true ,
255255 _ => false ,
256256 }
257257 }
@@ -267,8 +267,8 @@ impl ToSql for MaskedIpAddr {
267267 } ) ;
268268 w. push ( self . mask ) ; // Subnet mask
269269 w. push ( match * ty { // cidr
270- Type :: Cidr => true as u8 ,
271- Type :: Inet => false as u8 ,
270+ types :: CIDR => true as u8 ,
271+ types :: INET => false as u8 ,
272272 _ => unreachable ! ( ) ,
273273 } ) ;
274274 w. push ( match self . addr {
@@ -283,6 +283,6 @@ impl ToSql for MaskedIpAddr {
283283 Ok ( IsNull :: No )
284284 }
285285
286- accepts ! ( Type :: Cidr , Type :: Inet ) ;
286+ accepts ! ( types :: CIDR , types :: INET ) ;
287287 to_sql_checked ! ( ) ;
288288}
0 commit comments