about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2024-03-04 22:16:32 +0100
committerGitHub <noreply@github.com>2024-03-04 22:16:32 +0100
commit9d81d4e46b86dc03841c41e01a1c62db6b67a110 (patch)
treea808badd5e17d1bce145aa63f8dc1c2ff0bc3c1b
parent58a0f64c8b70a44619c0392fc877af8c6dc56858 (diff)
parente46306043b8e8270b1cace5bec7cd563e8ea9ae1 (diff)
downloadrust-9d81d4e46b86dc03841c41e01a1c62db6b67a110.tar.gz
rust-9d81d4e46b86dc03841c41e01a1c62db6b67a110.zip
Rollup merge of #121939 - jonaspleyer:patch-typo-core-From-descr, r=workingjubilee
Small enhancement to description of From trait

- fix small typo
- avoid repetition of formulations
-rw-r--r--library/core/src/convert/mod.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/library/core/src/convert/mod.rs b/library/core/src/convert/mod.rs
index 85740dce866..63fd23ea9a9 100644
--- a/library/core/src/convert/mod.rs
+++ b/library/core/src/convert/mod.rs
@@ -466,10 +466,10 @@ pub trait Into<T>: Sized {
 /// Prefer using [`Into`] over using `From` when specifying trait bounds on a generic function.
 /// This way, types that directly implement [`Into`] can be used as arguments as well.
 ///
-/// The `From` is also very useful when performing error handling. When constructing a function
+/// The `From` trait is also very useful when performing error handling. When constructing a function
 /// that is capable of failing, the return type will generally be of the form `Result<T, E>`.
-/// The `From` trait simplifies error handling by allowing a function to return a single error type
-/// that encapsulate multiple error types. See the "Examples" section and [the book][book] for more
+/// `From` simplifies error handling by allowing a function to return a single error type
+/// that encapsulates multiple error types. See the "Examples" section and [the book][book] for more
 /// details.
 ///
 /// **Note: This trait must not fail**. The `From` trait is intended for perfect conversions.