mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-05-05 03:30:03 +00:00
Feature: Check for installed crates in cargo_install_v1_manifest (#582)
* Add & Impl new fn `CratesToml::collect_into_crates_versions` to iterate over crates listed in cargo_crates_v1, accessing their names and versions. * Re-export `CompactString`, `Version` & `Url` in binstalk-manifests for convenience * Fix `CratesToml::load_from_path`: Wrap `File` in `FileLock::new_shared` to avoid concurrent write while reading the file. * Filter out installed crates in cargo_install_v1_metadata * Make match in `filter_out_installed_crates` more explicit * Add new test `cargo_crates_v1::test::test_loading` * Optimize `CratesToml`: Use `Vec` instead of `BTreeMap` since we cannot simply call `BTreeMap::get` to find an entry for a crate anyway. This also accidentally fixed the CI. * Impl new API `CratesToml::remove` * Fix`CratesToml::append_to_path` by removing previous records of the crates that are just updated. Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
parent
887ebb6f6f
commit
39f175be04
3 changed files with 164 additions and 23 deletions
|
@ -14,3 +14,6 @@ pub mod binstall_crates_v1;
|
|||
pub mod cargo_crates_v1;
|
||||
|
||||
pub use binstalk_types::{cargo_toml_binstall, crate_info};
|
||||
pub use compact_str::CompactString;
|
||||
pub use semver::Version;
|
||||
pub use url::Url;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue