sed -i -s 's/#\[deriving(/#\[derive(/g' **/*.rs

This commit is contained in:
Jorge Aparicio
2015-01-03 22:54:18 -05:00
parent 8c5bb80d9b
commit 351409a622
231 changed files with 1115 additions and 1115 deletions

View File

@@ -29,7 +29,7 @@ use sys;
use vec::Vec;
/// Hints to the types of sockets that are desired when looking up hosts
#[deriving(Copy)]
#[derive(Copy)]
pub enum SocketType {
Stream, Datagram, Raw
}
@@ -38,7 +38,7 @@ pub enum SocketType {
/// to manipulate how a query is performed.
///
/// The meaning of each of these flags can be found with `man -s 3 getaddrinfo`
#[deriving(Copy)]
#[derive(Copy)]
pub enum Flag {
AddrConfig,
All,
@@ -51,7 +51,7 @@ pub enum Flag {
/// A transport protocol associated with either a hint or a return value of
/// `lookup`
#[deriving(Copy)]
#[derive(Copy)]
pub enum Protocol {
TCP, UDP
}
@@ -61,7 +61,7 @@ pub enum Protocol {
///
/// For details on these fields, see their corresponding definitions via
/// `man -s 3 getaddrinfo`
#[deriving(Copy)]
#[derive(Copy)]
pub struct Hint {
pub family: uint,
pub socktype: Option<SocketType>,
@@ -69,7 +69,7 @@ pub struct Hint {
pub flags: uint,
}
#[deriving(Copy)]
#[derive(Copy)]
pub struct Info {
pub address: SocketAddr,
pub family: uint,

View File

@@ -31,7 +31,7 @@ use vec::Vec;
pub type Port = u16;
#[deriving(Copy, PartialEq, Eq, Clone, Hash)]
#[derive(Copy, PartialEq, Eq, Clone, Hash)]
pub enum IpAddr {
Ipv4Addr(u8, u8, u8, u8),
Ipv6Addr(u16, u16, u16, u16, u16, u16, u16, u16)
@@ -62,7 +62,7 @@ impl fmt::Show for IpAddr {
}
}
#[deriving(Copy, PartialEq, Eq, Clone, Hash)]
#[derive(Copy, PartialEq, Eq, Clone, Hash)]
pub struct SocketAddr {
pub ip: IpAddr,
pub port: Port,