Skip to content

Commit b6c2a42

Browse files
committed
std: Make consistence between From and Into
Signed-off-by: xizheyin <[email protected]>
1 parent 7e552b4 commit b6c2a42

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -464,8 +464,8 @@ pub trait Into<T>: Sized {
464464
/// orphaning rules.
465465
/// See [`Into`] for more details.
466466
///
467-
/// Prefer using [`Into`] over using `From` when specifying trait bounds on a generic function.
468-
/// This way, types that directly implement [`Into`] can be used as arguments as well.
467+
/// Prefer using [`Into`] over [`From`] when specifying trait bounds on a generic function
468+
/// to ensure that types that only implement [`Into`] can be used as well.
469469
///
470470
/// The `From` trait is also very useful when performing error handling. When constructing a function
471471
/// that is capable of failing, the return type will generally be of the form `Result<T, E>`.

0 commit comments

Comments
 (0)