Skip to content

Commit

Permalink
Add cross-references between *IntoExt trait docs
Browse files Browse the repository at this point in the history
  • Loading branch information
steffahn committed Sep 6, 2021
1 parent c8246e0 commit 0e1930a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@ use core::convert::TryInto;

/// Extension trait for the [`Into`] trait, offering a method `.into_::<T>()` to specify the target
/// type of conversion.
///
/// See also [`TryIntoExt`] for an extension trait of the fallible alternative to [`Into`].
pub trait IntoExt<T_>: Into<T_> {
/// Calling <code>foo.[into]\()</code> using the standard library's [`Into`] trait can lead to
/// ambiguities. Some current workarounds to specify the target type `T` are to use
Expand Down Expand Up @@ -154,6 +156,8 @@ impl<S, T_> IntoExt<T_> for S where S: Into<T_> {}

/// Extension trait for the [`TryInto`] trait, offering a method `.try_into_::<T>()` to specify the target
/// type of conversion.
///
/// See also [`IntoExt`] for an extension trait of the infallible alternative to [`TryInto`].
pub trait TryIntoExt<T_>: TryInto<T_> {
#[allow(clippy::missing_errors_doc)]
/// Calling <code>foo.[try_into]\()</code> using the standard library's [`TryInto`] trait can lead to
Expand Down

0 comments on commit 0e1930a

Please sign in to comment.