mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-04-22 05:28:42 +00:00
Use CompactString
for Options::version_req
which is unlikely to be larger than 24 bytes. Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
parent
a2e6709ed6
commit
a52ac3fc7a
2 changed files with 5 additions and 2 deletions
|
@ -1,5 +1,7 @@
|
|||
use std::path::PathBuf;
|
||||
|
||||
use compact_str::CompactString;
|
||||
|
||||
use crate::{metafiles::binstall_v1::MetaData, DesiredTargets, PkgOverride};
|
||||
|
||||
mod resolve;
|
||||
|
@ -11,7 +13,7 @@ pub use install::*;
|
|||
pub struct Options {
|
||||
pub no_symlinks: bool,
|
||||
pub dry_run: bool,
|
||||
pub version: Option<String>,
|
||||
pub version: Option<CompactString>,
|
||||
pub manifest_path: Option<PathBuf>,
|
||||
pub cli_overrides: PkgOverride,
|
||||
pub desired_targets: DesiredTargets,
|
||||
|
|
|
@ -8,6 +8,7 @@ use std::{
|
|||
};
|
||||
|
||||
use clap::{AppSettings, Parser};
|
||||
use compact_str::CompactString;
|
||||
use log::{debug, error, info, warn, LevelFilter};
|
||||
use miette::{miette, Result, WrapErr};
|
||||
use simplelog::{ColorChoice, ConfigBuilder, TermLogger, TerminalMode};
|
||||
|
@ -42,7 +43,7 @@ struct Options {
|
|||
/// Cannot be used when multiple packages are installed at once, use the attached version
|
||||
/// syntax in that case.
|
||||
#[clap(help_heading = "Package selection", long = "version")]
|
||||
version_req: Option<String>,
|
||||
version_req: Option<CompactString>,
|
||||
|
||||
/// Override binary target set.
|
||||
///
|
||||
|
|
Loading…
Add table
Reference in a new issue