mirror of
https://github.com/NixOS/nix
synced 2025-06-26 11:41:15 +02:00
Add base32 encoder/decoder
This commit is contained in:
parent
a1ff43045b
commit
cce218f950
9 changed files with 349 additions and 4 deletions
|
@ -3,6 +3,7 @@ pub enum Error {
|
|||
InvalidPath(crate::store::StorePath),
|
||||
BadStorePath(std::path::PathBuf),
|
||||
BadNarInfo,
|
||||
BadBase32,
|
||||
IOError(std::io::Error),
|
||||
HttpError(reqwest::Error),
|
||||
Misc(String),
|
||||
|
@ -29,6 +30,7 @@ impl From<Error> for CppException {
|
|||
Error::BadStorePath(path) => unsafe {
|
||||
make_error(&format!("path '{}' is not a store path", path.display()))
|
||||
}, // FIXME
|
||||
Error::BadBase32 => unsafe { make_error("invalid base32 string") }, // FIXME
|
||||
Error::IOError(err) => unsafe { make_error(&err.to_string()) },
|
||||
Error::HttpError(err) => unsafe { make_error(&err.to_string()) },
|
||||
Error::Foreign(ex) => ex,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue