mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-04-22 13:38:43 +00:00
Impl binstall_v1::Error
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
parent
46c4d6f406
commit
461571075d
1 changed files with 19 additions and 0 deletions
|
@ -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<super::Source> for Source {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Diagnostic, Error)]
|
||||
pub enum Error {
|
||||
#[error(transparent)]
|
||||
Io(#[from] io::Error),
|
||||
|
||||
#[error(transparent)]
|
||||
SerdeJsonParse(#[from] serde_json::Error),
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue