From 0485702a6878bea3d8b21fef8801cb00f397d77a Mon Sep 17 00:00:00 2001 From: Oliver Schneider Date: Mon, 11 May 2015 09:39:18 +0200 Subject: [PATCH] update benchmarks --- benches/bench_log.rs | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/benches/bench_log.rs b/benches/bench_log.rs index e29a3168..24afe2d1 100644 --- a/benches/bench_log.rs +++ b/benches/bench_log.rs @@ -15,6 +15,7 @@ use serde::de::{self, Deserialize, Deserializer}; use serde::json::ser::escape_str; use serde::json; use serde::ser::{self, Serialize, Serializer}; +use std::str::FromStr; use rustc_serialize::Encodable; @@ -53,6 +54,11 @@ impl rustc_serialize::Decodable for HttpProtocol { } } +impl FromStr for HttpProtocol { + type Err = (); + fn from_str(s: &str) -> Result { unimplemented!() } +} + impl FromPrimitive for HttpProtocol { fn from_i64(i: i64) -> Option { FromPrimitive::from_u64(i as u64) @@ -101,6 +107,11 @@ enum HttpMethod { PATCH, } +impl FromStr for HttpMethod { + type Err = (); + fn from_str(s: &str) -> Result { unimplemented!() } +} + impl FromPrimitive for HttpMethod { fn from_i64(i: i64) -> Option { FromPrimitive::from_u64(i as u64) @@ -165,6 +176,11 @@ enum CacheStatus { Hit, } +impl FromStr for CacheStatus { + type Err = (); + fn from_str(s: &str) -> Result { unimplemented!() } +} + impl FromPrimitive for CacheStatus { fn from_i64(i: i64) -> Option { FromPrimitive::from_u64(i as u64) @@ -229,6 +245,11 @@ enum OriginProtocol { HTTPS, } +impl FromStr for OriginProtocol { + type Err = (); + fn from_str(s: &str) -> Result { unimplemented!() } +} + impl FromPrimitive for OriginProtocol { fn from_i64(i: i64) -> Option { FromPrimitive::from_u64(i as u64) @@ -286,6 +307,11 @@ enum ZonePlan { ENT, } +impl FromStr for ZonePlan { + type Err = (); + fn from_str(s: &str) -> Result { unimplemented!() } +} + impl FromPrimitive for ZonePlan { fn from_i64(i: i64) -> Option { FromPrimitive::from_u64(i as u64) @@ -596,6 +622,11 @@ enum Country { ZW, } +impl FromStr for Country { + type Err = (); + fn from_str(s: &str) -> Result { unimplemented!() } +} + impl FromPrimitive for Country { fn from_i64(i: i64) -> Option { FromPrimitive::from_u64(i as u64)