add default trait

This commit is contained in:
Y. T. Chung
2014-10-31 14:29:59 +08:00
parent 34c9f6949b
commit 875ff170c7
+8 -2
View File
@@ -70,12 +70,12 @@
extern crate serialize;
use serialize::json;
use std::io::{File, Read, Open};
use std::io::net::ip::{Port, SocketAddr};
use std::to_string::ToString;
use std::option::Option;
use std::default::Default;
use crypto::cipher::CIPHER_AES_256_CFB;
@@ -108,6 +108,12 @@ pub struct Config {
pub fast_open: bool,
}
impl Default for Config {
fn default() -> Config {
Config::new()
}
}
impl Config {
pub fn new() -> Config {
Config {