From e17f4fc1d4545f5c17b21805c5145b05495484ee Mon Sep 17 00:00:00 2001 From: Sean McArthur Date: Mon, 30 Mar 2015 17:56:48 -0700 Subject: convert: remove FromError, use From instead This removes the FromError trait, since it can now be expressed using the new convert::Into trait. All implementations of FromError where changed to From, and `try!` was changed to use From::from instead. Because this removes FromError, it is a breaking change, but fixing it simply requires changing the words `FromError` to `From`, and `from_error` to `from`. [breaking-change] --- src/libstd/sync/poison.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/libstd/sync') diff --git a/src/libstd/sync/poison.rs b/src/libstd/sync/poison.rs index c07c83d37f4..cea2def30f1 100644 --- a/src/libstd/sync/poison.rs +++ b/src/libstd/sync/poison.rs @@ -11,7 +11,7 @@ use prelude::v1::*; use cell::UnsafeCell; -use error::{Error, FromError}; +use error::{Error}; use fmt; use thread; @@ -144,8 +144,8 @@ impl PoisonError { pub fn get_mut(&mut self) -> &mut T { &mut self.guard } } -impl FromError> for TryLockError { - fn from_error(err: PoisonError) -> TryLockError { +impl From> for TryLockError { + fn from(err: PoisonError) -> TryLockError { TryLockError::Poisoned(err) } } -- cgit 1.4.1-3-g733a5