about summary refs log tree commit diff
path: root/src/libstd/error.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2015-06-08 20:52:33 +0000
committerbors <bors@rust-lang.org>2015-06-08 20:52:33 +0000
commit02c33b690b9270ef7d26412fdf4a8498acfea1a7 (patch)
tree6b24edc9c3eb5bca1e5c509cc7db61eba178ae48 /src/libstd/error.rs
parentdc72834e2b482e904352fb3442e0450ee0d53190 (diff)
parentc160192f5f26279eb065a163e651ce610247b108 (diff)
downloadrust-02c33b690b9270ef7d26412fdf4a8498acfea1a7.tar.gz
rust-02c33b690b9270ef7d26412fdf4a8498acfea1a7.zip
Auto merge of #26077 - SimonSapin:patch-6, r=alexcrichton
With the latter is provided by the `From` conversion trait, the former is now completely redundant. Their code is identical. Let’s deprecate now and plan to remove in the next cycle. (It’s `#[unstable]`.)

r? @alexcrichton 
CC @nagisa 
Diffstat (limited to 'src/libstd/error.rs')
-rw-r--r--src/libstd/error.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstd/error.rs b/src/libstd/error.rs
index 6d23df97000..328c75b6d9e 100644
--- a/src/libstd/error.rs
+++ b/src/libstd/error.rs
@@ -121,7 +121,7 @@ impl From<String> for Box<Error + Send + Sync> {
 #[stable(feature = "rust1", since = "1.0.0")]
 impl<'a, 'b> From<&'b str> for Box<Error + Send + Sync + 'a> {
     fn from(err: &'b str) -> Box<Error + Send + Sync + 'a> {
-        From::from(String::from_str(err))
+        From::from(String::from(err))
     }
 }