Skip to content

Commit 98e2c0b

Browse files
committed
std: Make consistence between From and Into
Signed-off-by: xizheyin <[email protected]>
1 parent 2cf7028 commit 98e2c0b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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)