mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-04-25 06:40:03 +00:00
Optimize bins::BinFile
(#422)
* Extract `infer_bin_dir_template` and call it once in `collect_bin_files` * Ensure `product.name.is_some()` is true * Avoid cloning `str` in `BinFile::from_product` * Optimize: Take reference in `bins::Data` * Optimize: Construct `CompactString` only when needed Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
parent
3da5cb9d9c
commit
2cc12f9b69
3 changed files with 81 additions and 64 deletions
|
@ -11,7 +11,7 @@ pub enum RepositoryHost {
|
|||
Unknown,
|
||||
}
|
||||
|
||||
/// Make sure to update possible_dirs in `bins::BinFile`
|
||||
/// Make sure to update possible_dirs in `bins::infer_bin_dir_template`
|
||||
/// if you modified FULL_FILENAMES or NOVERSION_FILENAMES.
|
||||
pub const FULL_FILENAMES: &[&str] = &[
|
||||
"{ name }-{ target }-v{ version }.{ archive-format }",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue