Skip to content

Commit cc50e7d

Browse files
committed
impl WriteBase32 for Vec<u5> show cannot fail
Use void::Void, which in uninhabited, to do this.
1 parent ae9f18a commit cc50e7d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/lib.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ use alloc::borrow::Cow;
7171
#[cfg(any(feature = "std", test))]
7272
use std::borrow::Cow;
7373

74-
use core::{fmt, mem};
74+
use core::{convert::Infallible, fmt, mem};
7575

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

234234
impl WriteBase32 for Vec<u5> {
235-
type Err = ();
235+
type Err = Infallible;
236236

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

0 commit comments

Comments
 (0)