feat(nix-compat/nixbase32): use data_encoding::DecodeError

Rather than having our own error type, just make decoding errors use
the same common error type.

Change-Id: Ie2c86972f3745c695253adc3214444ac0ab8db6e
Reviewed-on: https://cl.tvl.fyi/c/depot/+/9995
Reviewed-by: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
This commit is contained in:
edef 2023-11-10 18:32:40 +00:00
parent 7e317cfded
commit 4218e4dc0e
4 changed files with 28 additions and 30 deletions

View file

@ -1,5 +1,5 @@
use crate::nixbase32::{self, Nixbase32DecodeError};
use data_encoding::BASE64;
use crate::nixbase32;
use data_encoding::{DecodeError, BASE64};
use std::{
fmt,
path::PathBuf,
@ -28,7 +28,7 @@ pub enum Error {
#[error("Dash is missing between hash and name")]
MissingDash,
#[error("Hash encoding is invalid: {0}")]
InvalidHashEncoding(Nixbase32DecodeError),
InvalidHashEncoding(DecodeError),
#[error("Invalid length")]
InvalidLength,
#[error(