diff --git a/src/options.rs b/src/options.rs index 34ab655..1e64faf 100644 --- a/src/options.rs +++ b/src/options.rs @@ -16,8 +16,10 @@ impl Opts { pub const fn new(options: &'static[Opt]) -> Self { Self { flag_chars: "-", options } } - // TODO: Replace with a parser options construct - pub const fn new_flag(flag_chars: &'static str, options: &'static[Opt]) -> Self { - Self { flag_chars, options } + + /// Set the recognised flag/option characters. + pub const fn with_flag_chars(mut self, flag_chars: &'static str) -> Self { + self.flag_chars = flag_chars; + self } }