Skip to content

Commit

Permalink
Merge pull request #2 from lfairy/patch-1
Browse files Browse the repository at this point in the history
Rename extension traits as per rust-lang/rfcs#445
  • Loading branch information
reem committed Mar 24, 2015
2 parents 63241dd + 0d8607b commit 16ac788
Showing 1 changed file with 4 additions and 4 deletions.
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

0 comments on commit 16ac788

Please sign in to comment.