Mark cli::Args non-exhaustive so ArgsBuilder usage is mandatory

This commit is contained in:
Félix Saparelli 2021-04-11 00:56:47 +12:00
parent fca038b23c
commit 0b79e93c84
No known key found for this signature in database
GPG Key ID: B948C4BAE44FC474
1 changed files with 2 additions and 2 deletions

View File

@ -1,7 +1,6 @@
//! CLI arguments and library Args struct
//!
//! Use `ArgsBuilder` preferentially as that will shield you from breaking changes resulting from
//! added fields and some field type changes.
//! The [`Args`] struct is not constructable, use [`ArgsBuilder`].
//!
//! # Examples
//!
@ -26,6 +25,7 @@ use std::{
#[derive(Builder, Clone, Debug)]
#[builder(setter(into, strip_option))]
#[builder(build_fn(validate = "Self::validate"))]
#[non_exhaustive]
pub struct Args {
/// Command to execute in popen3 format (first program, rest arguments).
pub cmd: Vec<String>,