about summary refs log tree commit diff
path: root/src/libstd/io
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2017-01-13 10:42:33 +0100
committerGitHub <noreply@github.com>2017-01-13 10:42:33 +0100
commit5d03288e956a2f23cf6dd5d4d59ab95e7b3b73c2 (patch)
tree3f89d0b41d054ddfeac90ca4cc2a29368b2f6b17 /src/libstd/io
parent7c9ac4f5a6827bf0ee8458a9d08642a8c62d55e8 (diff)
parentd5c3becf00452fd1d35e695494d7ae41dedb11d8 (diff)
Rollup merge of #39024 - stjepang:owned-to-string, r=steveklabnik
Change `to_owned` to `to_string` in docs

We should teach conversion from `str` to `String` using `to_string` rather than the legacy `to_owned`.
Diffstat (limited to 'src/libstd/io')
-rw-r--r--src/libstd/io/error.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstd/io/error.rs b/src/libstd/io/error.rs
index 795c89c0007..434f522cc1e 100644
--- a/src/libstd/io/error.rs
+++ b/src/libstd/io/error.rs
@@ -388,12 +388,12 @@ impl Error {
     /// impl MyError {
     ///     fn new() -> MyError {
     ///         MyError {
-    ///             v: "oh no!".to_owned()
+    ///             v: "oh no!".to_string()
     ///         }
     ///     }
     ///
     ///     fn change_message(&mut self, new_message: &str) {
-    ///         self.v = new_message.to_owned();
+    ///         self.v = new_message.to_string();
     ///     }
     /// }
     ///