Silence a warning

This commit is contained in:
Erick Tryzelaar 2015-03-05 19:16:59 -08:00
parent ddfaf9d177
commit 5c06137499

View File

@ -47,7 +47,7 @@ impl rustc_serialize::Encodable for HttpProtocol {
impl rustc_serialize::Decodable for HttpProtocol { impl rustc_serialize::Decodable for HttpProtocol {
fn decode<D: rustc_serialize::Decoder>(d: &mut D) -> Result<HttpProtocol, D::Error> { fn decode<D: rustc_serialize::Decoder>(d: &mut D) -> Result<HttpProtocol, D::Error> {
match FromPrimitive::from_uint(try!(d.read_usize())) { match FromPrimitive::from_usize(try!(d.read_usize())) {
Some(value) => Ok(value), Some(value) => Ok(value),
None => Err(d.error("cannot convert from usize")), None => Err(d.error("cannot convert from usize")),
} }
@ -95,7 +95,7 @@ impl rustc_serialize::Encodable for HttpMethod {
impl rustc_serialize::Decodable for HttpMethod { impl rustc_serialize::Decodable for HttpMethod {
fn decode<D: rustc_serialize::Decoder>(d: &mut D) -> Result<HttpMethod, D::Error> { fn decode<D: rustc_serialize::Decoder>(d: &mut D) -> Result<HttpMethod, D::Error> {
match FromPrimitive::from_uint(try!(d.read_usize())) { match FromPrimitive::from_usize(try!(d.read_usize())) {
Some(value) => Ok(value), Some(value) => Ok(value),
None => Err(d.error("cannot convert from usize")), None => Err(d.error("cannot convert from usize")),
} }