TryFrom stable
TryFrom is now stable, so use that. Additionally re-export OrderedFloat since
it is used by the generated code. Relax dependencies to reduce downstream
conflicts.
diff --git a/lib/rs/src/protocol/mod.rs b/lib/rs/src/protocol/mod.rs
index 11c0289..1ab1658 100644
--- a/lib/rs/src/protocol/mod.rs
+++ b/lib/rs/src/protocol/mod.rs
@@ -57,10 +57,9 @@
//! protocol.write_field_end().unwrap();
//! ```
-use std::convert::From;
+use std::convert::{From, TryFrom};
use std::fmt;
use std::fmt::{Display, Formatter};
-use try_from::TryFrom;
use transport::{TReadTransport, TWriteTransport};
use {ProtocolError, ProtocolErrorKind};
@@ -770,8 +769,8 @@
}
impl TryFrom<u8> for TMessageType {
- type Err = ::Error;
- fn try_from(b: u8) -> ::Result<Self> {
+ type Error = ::Error;
+ fn try_from(b: u8) -> Result<Self, Self::Error> {
match b {
0x01 => Ok(TMessageType::Call),
0x02 => Ok(TMessageType::Reply),