Skip to content

Commit

Permalink
Update mod.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
tae-soo-kim authored Oct 10, 2023
1 parent fa6d1e7 commit e15e9a6
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions library/core/src/convert/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -618,12 +618,11 @@ pub trait TryInto<T>: Sized {
/// For example, there is no way to convert an [`i64`] into an [`i32`]
/// using the [`From`] trait, because an [`i64`] may contain a value
/// that an [`i32`] cannot represent and so the conversion would lose data.
/// This might be handled by truncating the [`i64`] to an [`i32`] (essentially
/// giving the [`i64`]'s value modulo [`i32::MAX`]) or by simply returning
/// [`i32::MAX`], or by some other method. The [`From`] trait is intended
/// for perfect conversions, so the `TryFrom` trait informs the
/// programmer when a type conversion could go bad and lets them
/// decide how to handle it.
/// This might be handled by truncating the [`i64`] to an [`i32`] or by
/// simply returning [`i32::MAX`], or by some other method. The [`From`]
/// trait is intended for perfect conversions, so the `TryFrom` trait
/// informs the programmer when a type conversion could go bad and lets
/// them decide how to handle it.
///
/// # Generic Implementations
///
Expand Down

0 comments on commit e15e9a6

Please sign in to comment.