Skip to content

Commit

Permalink
Merge #43: impl WriteBase32 for Vec<u5> show cannot fail
Browse files Browse the repository at this point in the history
cc50e7d `impl WriteBase32 for Vec<u5>` show cannot fail (John Ericson)

Pull request description:

  Use void::Void, which in uninhabited, to do this.

ACKs for top commit:
  apoelstra:
    utACK cc50e7d
  tcharding:
    ACK cc50e7d

Tree-SHA512: 809b001c57a985677ea7e077eca77be964d283474c83dcc10232c4d003711b3c17a84e17381eca5341b7867a44f879806b31140b1430b48ab505a0c965ee6e49
  • Loading branch information
apoelstra committed Sep 28, 2022
2 parents ae9f18a + cc50e7d commit 3f92d7d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib.rs
Expand Up @@ -71,7 +71,7 @@ use alloc::borrow::Cow;
#[cfg(any(feature = "std", test))]
use std::borrow::Cow;

use core::{fmt, mem};
use core::{convert::Infallible, fmt, mem};

/// Integer in the range `0..32`
#[derive(PartialEq, Eq, Debug, Copy, Clone, Default, PartialOrd, Ord, Hash)]
Expand Down Expand Up @@ -232,7 +232,7 @@ pub trait FromBase32: Sized {
}

impl WriteBase32 for Vec<u5> {
type Err = ();
type Err = Infallible;

fn write(&mut self, data: &[u5]) -> Result<(), Self::Err> {
self.extend_from_slice(data);
Expand Down

0 comments on commit 3f92d7d

Please sign in to comment.