From fee373821f0e38da00c405f55d68242c64689629 Mon Sep 17 00:00:00 2001 From: Botahamec Date: Sun, 23 Oct 2022 16:42:44 -0400 Subject: Better docs --- src/exun.rs | 10 +++++----- src/lib.rs | 1 + src/result.rs | 4 ++-- 3 files changed, 8 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/exun.rs b/src/exun.rs index 7f6376e..138ff4f 100644 --- a/src/exun.rs +++ b/src/exun.rs @@ -71,7 +71,7 @@ impl From for Exun { } impl Exun { - /// Converts from `Expect` to [`Option`]. + /// Converts from `Exun` to [`Option`]. /// /// Converts `self` into an [`Option`], consuming `self`, and discarding /// the unexpected value, if any. @@ -95,7 +95,7 @@ impl Exun { } } - /// Converts from `Expect` to [`Option`]. + /// Converts from `Exun` to [`Option`]. /// /// Converts `self` into an [`Option`], consuming `self`, and discarding /// the expected value, if any. @@ -121,7 +121,7 @@ impl Exun { } } - /// Converts from `&mut Expect` to `Expect<&mut E, &mut U>`. + /// Converts from `&mut Exun` to `Exun<&mut E, &mut U>`. /// /// # Examples /// @@ -152,7 +152,7 @@ impl Exun { } } - /// Maps a `Expect` to `Expect` by applying a function to a + /// Maps a `Exun` to `Exun` by applying a function to a /// contained [`Expected`] value, leaving an [`Unexpected`] value /// untouched. /// @@ -178,7 +178,7 @@ impl Exun { } } - /// Maps a `Expect` to `Expect` by applying a function to a + /// Maps a `Exun` to `Exun` by applying a function to a /// contained [`Unexpected`] value, leaving an [`Expected`] value /// untouched. /// diff --git a/src/lib.rs b/src/lib.rs index e499ea2..d26ea6e 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -155,5 +155,6 @@ pub use result::ResultMsgExt; pub use unexpected::{RawUnexpected, UnexpectedError}; pub use Exun::{Expected, Unexpected}; +/// A type alias for [`Exun = Exun; diff --git a/src/result.rs b/src/result.rs index dfcb7ef..987fc3a 100644 --- a/src/result.rs +++ b/src/result.rs @@ -15,7 +15,7 @@ use sealed::Sealed; /// [`Result::unexpect`]: `ResultErrorExt::unexpect` #[cfg(feature = "std")] pub trait ResultErrorExt: Sealed { - /// Converts `Result` to `Result`. + /// Converts [`Result`] to [`Result`]. /// /// # Examples /// @@ -69,7 +69,7 @@ impl ResultErrorExt for Result { /// /// [`Result::unexpect_msg`]: `ResultMsgExt::unexpect_msg` pub trait ResultMsgExt: Sealed { - /// Converts `Result` to `Result`. + /// Converts [`Result`] to [`Result`]. /// /// This is provided for compatibility with `no_std`. If your type /// implements [`Error`], then you should prefer that instead. -- cgit v1.2.3