Skip to content

Commit

Permalink
Unrolled build for rust-lang#121939
Browse files Browse the repository at this point in the history
Rollup merge of rust-lang#121939 - jonaspleyer:patch-typo-core-From-descr, r=workingjubilee

Small enhancement to description of From trait

- fix small typo
- avoid repetition of formulations
  • Loading branch information
rust-timer committed Mar 5, 2024
2 parents d18480b + e463060 commit 0f87cc0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions library/core/src/convert/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 0f87cc0

Please sign in to comment.