mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-04-24 14:28:42 +00:00
Fix v1 manifest format for git and local path (#1821)
* Bump simple-git to v0.2.10 Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com> * Fix v1 manifest format for git and local path Fixed #1815 Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com> * Fix v1 format for custom registry Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com> * Remove unused functions Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com> * Fix compilation Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com> * Update git.sh Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com> * Fixed git.sh for windows Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com> * fixx git.sh for win Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com> * Update git.sh Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com> * fix git.sh Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com> --------- Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com> Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com>
This commit is contained in:
parent
5a316b765f
commit
eba07fb147
12 changed files with 112 additions and 38 deletions
|
@ -66,12 +66,6 @@ impl CratesToml<'_> {
|
|||
Self::load_from_reader(file)
|
||||
}
|
||||
|
||||
/// Only use it when you know that the crate is not in the manifest.
|
||||
/// Otherwise, you need to call [`CratesToml::remove`] first.
|
||||
fn insert(&mut self, cvs: &CrateVersionSource, bins: Vec<CompactString>) {
|
||||
self.v1.push((cvs.to_string(), Cow::owned(bins)));
|
||||
}
|
||||
|
||||
pub fn remove(&mut self, name: &str) {
|
||||
self.v1.retain(|(s, _bin)| {
|
||||
s.split_once(' ')
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
use std::{borrow::Cow, fmt, str::FromStr};
|
||||
|
||||
use binstalk_types::{crate_info::cratesio_url, maybe_owned::MaybeOwned};
|
||||
use binstalk_types::maybe_owned::MaybeOwned;
|
||||
use compact_str::CompactString;
|
||||
use miette::Diagnostic;
|
||||
use semver::Version;
|
||||
|
@ -42,12 +42,6 @@ pub enum Source<'a> {
|
|||
Registry(MaybeOwned<'a, Url>),
|
||||
}
|
||||
|
||||
impl Source<'static> {
|
||||
pub fn cratesio_registry() -> Self {
|
||||
Self::Registry(MaybeOwned::Borrowed(cratesio_url()))
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> From<&'a CrateSource> for Source<'a> {
|
||||
fn from(source: &'a CrateSource) -> Self {
|
||||
use SourceType::*;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue