diff --git a/src/metafiles/binstall_v1.rs b/src/metafiles/binstall_v1.rs index 35e78ed8..3ed2a1bc 100644 --- a/src/metafiles/binstall_v1.rs +++ b/src/metafiles/binstall_v1.rs @@ -1,9 +1,19 @@ +use std::{ + fs, + io::{self, Write}, + iter::IntoIterator, + path::Path, +}; + use compact_str::CompactString; +use miette::Diagnostic; use semver::Version; use serde::{Deserialize, Serialize}; +use thiserror::Error; use url::Url; use crate::binstall::MetaData; +use crate::FileLock; #[derive(Debug, Serialize, Deserialize)] pub struct Entry { @@ -65,3 +75,12 @@ impl From for Source { } } } + +#[derive(Debug, Diagnostic, Error)] +pub enum Error { + #[error(transparent)] + Io(#[from] io::Error), + + #[error(transparent)] + SerdeJsonParse(#[from] serde_json::Error), +}