Skip to content

Commit fb2b918

Browse files
committed
Small enhancement to description of From trait
- fix small typo - avoid repetition of formulations
1 parent 9e73597 commit fb2b918

File tree

1 file changed

+2
-2
lines changed
  • library/core/src/convert

1 file changed

+2
-2
lines changed

library/core/src/convert/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -466,9 +466,9 @@ pub trait Into<T>: Sized {
466466
/// Prefer using [`Into`] over using `From` when specifying trait bounds on a generic function.
467467
/// This way, types that directly implement [`Into`] can be used as arguments as well.
468468
///
469-
/// The `From` is also very useful when performing error handling. When constructing a function
469+
/// The `From` trait is also very useful when performing error handling. When constructing a function
470470
/// that is capable of failing, the return type will generally be of the form `Result<T, E>`.
471-
/// The `From` trait simplifies error handling by allowing a function to return a single error type
471+
/// It simplifies error handling by allowing a function to return a single error type
472472
/// that encapsulate multiple error types. See the "Examples" section and [the book][book] for more
473473
/// details.
474474
///

0 commit comments

Comments
 (0)