Small enhancement to description of From trait
- fix small typo - avoid repetition of formulations
This commit is contained in:
parent
9e73597e5a
commit
fb2b918866
@ -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.
|
||||
///
|
||||
|
Loading…
Reference in New Issue
Block a user