Skip to content

Commit c0c6748

Browse files
committed
Update for switch of FromError to From
1 parent 463a2fc commit c0c6748

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/element_builder.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
use super::{Event, Xml, Element, StartTag, EndTag};
88
use parser::ParserError;
99
use std::collections::HashMap;
10-
use std::error::{Error, FromError};
10+
use std::error::Error;
1111
use std::fmt;
1212

1313
#[derive(PartialEq, Debug, Clone)]
@@ -48,8 +48,8 @@ impl fmt::Display for BuilderError {
4848
}
4949
}
5050

51-
impl FromError<ParserError> for BuilderError {
52-
fn from_error(err: ParserError) -> BuilderError { BuilderError::Parser(err) }
51+
impl From<ParserError> for BuilderError {
52+
fn from(err: ParserError) -> BuilderError { BuilderError::Parser(err) }
5353
}
5454

5555
/// An Element Builder, building `Element`s from `Event`s as produced by `Parser`
@@ -103,7 +103,7 @@ impl ElementBuilder {
103103
e: Result<Event, ParserError>) -> Option<Result<Element, BuilderError>> {
104104
let e = match e {
105105
Ok(o) => o,
106-
Err(e) => return Some(Err(FromError::from_error(e)))
106+
Err(e) => return Some(Err(From::from(e)))
107107
};
108108
match e {
109109
Event::PI(cont) => {

0 commit comments

Comments
 (0)