Drop dependency on try_from.

This bumps the minimum supported stable Rust version to 1.34.

The TryFrom and TryInto traits are still reexported to not break the
API, but these reexports are deprecated and will be removed in a future
release.
This commit is contained in:
Emmanuel Gil Peyrot 2019-04-12 10:58:42 +02:00
commit 5bf14b0b22
54 changed files with 91 additions and 92 deletions

View file

@ -9,7 +9,7 @@ use crate::ns;
use jid::Jid;
use minidom::Element;
use std::collections::BTreeMap;
use try_from::TryFrom;
use std::convert::TryFrom;
/// Should be implemented on every known payload of a `<message/>`.
pub trait MessagePayload: TryFrom<Element> + Into<Element> {}
@ -150,7 +150,7 @@ impl Message {
}
impl TryFrom<Element> for Message {
type Err = Error;
type Error = Error;
fn try_from(root: Element) -> Result<Message, Error> {
check_self!(root, "message", DEFAULT_NS);