mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-05-02 10:10:02 +00:00
Impl binstall_v1::default_path
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
parent
ce50186f4a
commit
951a0f8b9f
1 changed files with 6 additions and 2 deletions
|
@ -2,7 +2,7 @@ use std::{
|
||||||
fs,
|
fs,
|
||||||
io::{self, Write},
|
io::{self, Write},
|
||||||
iter::IntoIterator,
|
iter::IntoIterator,
|
||||||
path::Path,
|
path::{Path, PathBuf},
|
||||||
};
|
};
|
||||||
|
|
||||||
use compact_str::CompactString;
|
use compact_str::CompactString;
|
||||||
|
@ -13,7 +13,7 @@ use thiserror::Error;
|
||||||
use url::Url;
|
use url::Url;
|
||||||
|
|
||||||
use crate::binstall::MetaData;
|
use crate::binstall::MetaData;
|
||||||
use crate::FileLock;
|
use crate::{cargo_home, FileLock};
|
||||||
|
|
||||||
#[derive(Debug, Serialize, Deserialize)]
|
#[derive(Debug, Serialize, Deserialize)]
|
||||||
pub struct Item {
|
pub struct Item {
|
||||||
|
@ -108,3 +108,7 @@ where
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn default_path() -> Result<PathBuf, Error> {
|
||||||
|
Ok(cargo_home()?.join(".binstall-crates.toml"))
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue