Skip to content

Commit 0e5fc9d

Browse files
committed
refact(std/flag): make FlagParser fields private
1 parent ba53efe commit 0e5fc9d

File tree

1 file changed

+21
-21
lines changed

1 file changed

+21
-21
lines changed

lib/std/src/flag/mod.ri

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,17 @@ public static space := " ";
1515
/// Data object storing information about a defined flag.
1616
public struct Flag < traits.Stringable {
1717
/// Name as it appears on command line.
18-
public name: string;
18+
name: string;
1919

2020
/// Shortcut.
21-
public abbr: uint8;
21+
abbr: uint8;
2222

2323
/// Help message.
24-
public usage: string;
24+
usage: string;
2525

2626
/// Something like '<arg>' that appears in usage, and also the
2727
/// default value, when the flag is not given.
28-
public value_desc: string;
28+
value_desc: string;
2929

3030
public func to_string(&self) -> string {
3131
return "flag:
@@ -44,33 +44,33 @@ public struct Flag < traits.Stringable {
4444
#[boxed]
4545
public struct FlagParser {
4646
/// The original arguments to be parsed.
47-
public original_args: []string;
47+
original_args: []string;
4848
/// The index of a `--`, `none` if there is not any.
49-
public idx_dashdash: ?usize;
49+
idx_dashdash: ?usize;
5050
/// All options after `--` are ignored, and will be passed to the application unmodified.
51-
public all_after_dashdash: []string;
51+
all_after_dashdash: []string;
5252
/// When set, `--help` will print:
5353
/// Examples:
5454
/// $ <appname> <usage_examples[0]>
5555
/// $ <appname> <usage_examples[1]>
5656
/// $ ...
57-
public mut usage_examples: []string;
58-
public mut default_help_label: string := "Display this help and exit.";
59-
public mut default_version_label: string := "Show version information and exit.";
60-
public mut flags: []Flag;
57+
mut usage_examples: []string;
58+
mut default_help_label: string := "Display this help and exit.";
59+
mut default_version_label: string := "Show version information and exit.";
60+
mut flags: []Flag;
6161
/// The current list of processed args.
62-
public mut args: []string;
63-
public mut max_free_args: usize;
64-
public mut min_free_args: usize;
65-
public mut application_name: string;
66-
public mut application_version: string;
67-
public mut application_short_description: string;
68-
public mut application_description: string;
69-
public mut args_description: string;
62+
mut args: []string;
63+
mut max_free_args: usize;
64+
mut min_free_args: usize;
65+
mut application_name: string;
66+
mut application_version: string;
67+
mut application_short_description: string;
68+
mut application_description: string;
69+
mut args_description: string;
7070
/// Whether passing undescribed arguments is allowed.
71-
public mut allow_unknown_args: bool;
71+
mut allow_unknown_args: bool;
7272
/// When set, --help will display all the collected footers at the bottom.
73-
public mut footers: []string;
73+
mut footers: []string;
7474

7575
/// Create a new flag parser for the given args.
7676
public func new(args: []string) -> Self {

0 commit comments

Comments
 (0)