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

@ -12,7 +12,7 @@ use crate::ns;
use minidom::Element;
use std::collections::BTreeMap;
use std::str::FromStr;
use try_from::TryFrom;
use std::convert::TryFrom;
generate_element!(
/// Represents a range in a file.
@ -128,7 +128,7 @@ impl File {
}
impl TryFrom<Element> for File {
type Err = Error;
type Error = Error;
fn try_from(elem: Element) -> Result<File, Error> {
check_self!(elem, "file", JINGLE_FT);
@ -253,7 +253,7 @@ pub struct Description {
}
impl TryFrom<Element> for Description {
type Err = Error;
type Error = Error;
fn try_from(elem: Element) -> Result<Description, Error> {
check_self!(elem, "description", JINGLE_FT, "JingleFT description");
@ -301,7 +301,7 @@ pub struct Checksum {
}
impl TryFrom<Element> for Checksum {
type Err = Error;
type Error = Error;
fn try_from(elem: Element) -> Result<Checksum, Error> {
check_self!(elem, "checksum", JINGLE_FT);