mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-04-25 12:47:56 +00:00
update benchmarks
This commit is contained in:
@@ -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<HttpProtocol, ()> { unimplemented!() }
|
||||
}
|
||||
|
||||
impl FromPrimitive for HttpProtocol {
|
||||
fn from_i64(i: i64) -> Option<HttpProtocol> {
|
||||
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<HttpMethod, ()> { unimplemented!() }
|
||||
}
|
||||
|
||||
impl FromPrimitive for HttpMethod {
|
||||
fn from_i64(i: i64) -> Option<HttpMethod> {
|
||||
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<CacheStatus, ()> { unimplemented!() }
|
||||
}
|
||||
|
||||
impl FromPrimitive for CacheStatus {
|
||||
fn from_i64(i: i64) -> Option<CacheStatus> {
|
||||
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<OriginProtocol, ()> { unimplemented!() }
|
||||
}
|
||||
|
||||
impl FromPrimitive for OriginProtocol {
|
||||
fn from_i64(i: i64) -> Option<OriginProtocol> {
|
||||
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<ZonePlan, ()> { unimplemented!() }
|
||||
}
|
||||
|
||||
impl FromPrimitive for ZonePlan {
|
||||
fn from_i64(i: i64) -> Option<ZonePlan> {
|
||||
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<Country, ()> { unimplemented!() }
|
||||
}
|
||||
|
||||
impl FromPrimitive for Country {
|
||||
fn from_i64(i: i64) -> Option<Country> {
|
||||
FromPrimitive::from_u64(i as u64)
|
||||
|
||||
Reference in New Issue
Block a user