Silence a warning
This commit is contained in:
parent
ddfaf9d177
commit
5c06137499
@ -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")),
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user