about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJonas Pleyer <jonas.pleyer@fdm.uni-freiburg.de>2024-03-03 15:21:39 +0100
committerJonas Pleyer <jonas.pleyer@fdm.uni-freiburg.de>2024-03-03 15:29:09 +0100
commitfb2b918866e0457857c17f71911df31da1d2dac3 (patch)
treea53eb050f11bc8e9dc1c27ec4fe5fc8307c6028b
parent9e73597e5a83e96e223c10b3810566c74a86a0c1 (diff)
Small enhancement to description of From trait
- fix small typo
- avoid repetition of formulations
-rw-r--r--library/core/src/convert/mod.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/library/core/src/convert/mod.rs b/library/core/src/convert/mod.rs
index 85740dce866..4dddf92b3e0 100644
--- a/library/core/src/convert/mod.rs
+++ b/library/core/src/convert/mod.rs
@@ -466,9 +466,9 @@ 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
+/// It 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
 /// details.
 ///