mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-05-07 12:40:04 +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::{
|
|||
sync::Arc,
|
||||
};
|
||||
|
||||
use cargo_toml::Manifest;
|
||||
use compact_str::{CompactString, ToCompactString};
|
||||
use itertools::Itertools;
|
||||
use leon::Template;
|
||||
|
@ -22,8 +21,8 @@ use crate::{
|
|||
errors::{BinstallError, VersionParseError},
|
||||
fetchers::{Data, Fetcher, TargetData},
|
||||
helpers::{
|
||||
self, cargo_toml_workspace::load_manifest_from_workspace, download::ExtractedFiles,
|
||||
remote::Client, target_triple::TargetTriple,
|
||||
self, cargo_toml::Manifest, cargo_toml_workspace::load_manifest_from_workspace,
|
||||
download::ExtractedFiles, remote::Client, target_triple::TargetTriple,
|
||||
},
|
||||
manifests::cargo_toml_binstall::{Meta, PkgMeta, PkgOverride},
|
||||
ops::{CargoTomlFetchOverride, Options},
|
||||
|
@ -381,7 +380,7 @@ impl PackageInfo {
|
|||
let dir = TempDir::new()?;
|
||||
helpers::git::Repository::shallow_clone(git_url, dir.as_ref())?;
|
||||
|
||||
load_manifest_from_workspace(dir.as_ref(), &name)
|
||||
load_manifest_from_workspace(dir.as_ref(), &name).map_err(BinstallError::from)
|
||||
})
|
||||
.await??
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue