mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-05-22 11:50:02 +00:00
Refactor: Extract cargo_toml_workspace
as a new crate (#1287)
To reduce codegen time of `binstalk` and also enable others to reuse this crate. Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
parent
c57356e870
commit
8ff13c1b36
19 changed files with 290 additions and 47 deletions
|
@ -7,7 +7,6 @@ use std::{
|
|||
use binstalk_downloader::{
|
||||
download::DownloadError, gh_api_client::GhApiError, remote::Error as RemoteError,
|
||||
};
|
||||
use cargo_toml::Error as CargoTomlError;
|
||||
use compact_str::CompactString;
|
||||
use miette::{Diagnostic, Report};
|
||||
use target_lexicon::ParseError as TargetTripleParseError;
|
||||
|
@ -17,7 +16,9 @@ use tracing::{error, warn};
|
|||
|
||||
use crate::{
|
||||
drivers::{InvalidRegistryError, RegistryError},
|
||||
helpers::cargo_toml_workspace::LoadManifestFromWSError,
|
||||
helpers::{
|
||||
cargo_toml::Error as CargoTomlError, cargo_toml_workspace::Error as LoadManifestFromWSError,
|
||||
},
|
||||
};
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
|
@ -500,3 +501,9 @@ impl From<InvalidRegistryError> for BinstallError {
|
|||
BinstallError::RegistryParseError(Box::new(e))
|
||||
}
|
||||
}
|
||||
|
||||
impl From<LoadManifestFromWSError> for BinstallError {
|
||||
fn from(e: LoadManifestFromWSError) -> Self {
|
||||
BinstallError::LoadManifestFromWSError(Box::new(e))
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue