Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,12 @@ pub fn unreachable<T = ()>(_: Void) -> T {
}

/// Extensions to `Result<T, Void>`
pub trait VoidExtensions<T>: Sized {
pub trait ResultVoidExt<T>: Sized {
/// Get the value out of a wrapper.
fn void_unwrap(self) -> T;
}

impl<T> VoidExtensions<T> for Result<T, Void> {
impl<T> ResultVoidExt<T> for Result<T, Void> {
/// Get the value out of an always-ok Result.
///
/// Never panics, since it is statically known to be Ok.
Expand All @@ -75,12 +75,12 @@ impl<T> VoidExtensions<T> for Result<T, Void> {
}

/// Extensions to `Result<Void, E>`
pub trait ErrVoidExtensions<E>: Sized {
pub trait ResultVoidErrExt<E>: Sized {
/// Get the error out of a wrapper.
fn void_unwrap_err(self) -> E;
}

impl<E> ErrVoidExtensions<E> for Result<Void, E> {
impl<E> ResultVoidErrExt<E> for Result<Void, E> {
/// Get the error out of an always-err Result.
///
/// Never panics, since it is statically known to be Err.
Expand Down