We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
4.3.8
Box of an unsized type is often smaller than its owned counterpart. And it is cheaper to clone Rc and Arc than cloning the owned version.
Box
Rc
Arc
Allow parsing arguments directly to smart pointer types such as Box, Rc, and Arc. For example:
#[derive(Clone, Parser)] struct Args { #[clap(long, short)] tag: Arc<[Box<str>]>, // instead of Vec<String> files: Arc<[Box<Path>]>, // instead of Vec<PathBuf> }
No response
The text was updated successfully, but these errors were encountered:
#4626 is a more general re-evaluation of how we infer meaning from types
Sorry, something went wrong.
No branches or pull requests
Please complete the following tasks
Clap Version
4.3.8
Describe your use case
Box
of an unsized type is often smaller than its owned counterpart. And it is cheaper to cloneRc
andArc
than cloning the owned version.Describe the solution you'd like
Allow parsing arguments directly to smart pointer types such as
Box
,Rc
, andArc
. For example:Alternatives, if applicable
No response
Additional Context
No response
The text was updated successfully, but these errors were encountered: